runtime

This module provides information about your extension and the environment it's running in.

It also provides messaging APIs enabling you to:

Types

runtime.Port

Represents one end of a connection between two specific contexts, which can be used to exchange messages.

runtime.MessageSender

Contains information about the sender of a message or connection request.

runtime.PlatformOs

Identifies the browser's operating system.

runtime.PlatformArch

Identifies the browser's processor architecture.

runtime.PlatformInfo

Contains information about the platform the browser is running on.

runtime.PlatformNaclArch

The deprecated enumeration value representing Google Native Client architecture. Consider migrating to PlatformArch, which is supported by Safari and Mozilla, and represents the true CPU architecture and conveys correct bitness information on ARM.

runtime.RequestUpdateCheckStatus

Result of a call to runtime.requestUpdateCheck().

runtime.OnInstalledReason

The reason that the runtime.onInstalled event is being dispatched.

runtime.OnPerformanceWarningCategory

The category of warning that dispatched the runtime.onPerformanceWarning event.

runtime.OnPerformanceWarningSeverity

The severity of warning that dispatched the runtime.onPerformanceWarning event.

runtime.OnRestartRequiredReason

The reason that the runtime.onRestartRequired event is being dispatched.

Properties

runtime.lastError

This value is set when an asynchronous function has an error condition that it needs to report to its caller.

runtime.id

The ID of the extension.

Functions

runtime.getBackgroundPage()

Retrieves the Window object for the background page running inside the current extension.

runtime.openOptionsPage()

Opens your extension's options page.

runtime.getContexts()

Gets details about the contexts associated with the extension.

runtime.getFrameId()

Gets the frame ID of any window global or frame element.

runtime.getManifest()

Gets an object representation of the complete manifest.json file.

runtime.getURL()

Given a relative path from the manifest.json to a resource packaged with the extension, returns a fully-qualified URL.

runtime.getVersion()

Gets the extension version string from the manifest.json file version key. The returned version may differ from the string in the file because the browser can parse and serialize it.

runtime.setUninstallURL()

Sets a URL to be visited when the extension is uninstalled.

runtime.reload()

Reloads the extension.

runtime.requestUpdateCheck()

Checks for updates to this extension.

runtime.connect()

Establishes a connection from a content script to the main extension process, or from one extension to a different extension.

runtime.connectNative()

Connects the extension to a native application on the user's computer.

runtime.sendMessage()

Sends a message to event listeners within your extension or a different extension. Similar to runtime.connect but only sends a single message, with an optional response.

runtime.sendNativeMessage()

Sends a message from an extension to a native application.

runtime.getPlatformInfo()

Returns information about the current platform.

runtime.getBrowserInfo()

Returns information about the browser in which this extension is installed.

runtime.getPackageDirectoryEntry()

Returns a DirectoryEntry for the package directory.

Events

runtime.onStartup

Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started.

runtime.onInstalled

Fired when the extension is first installed, when the extension is updated to a new version, and when the browser is updated to a new version.

runtime.onSuspend

Sent to the event page just before the extension is unloaded. This gives the extension an opportunity to do some cleanup.

runtime.onSuspendCanceled

Sent after runtime.onSuspend to indicate that the extension won't be unloaded after all.

runtime.onUpdateAvailable

Fired when an update is available, but isn't installed immediately because the extension is currently running.

runtime.onBrowserUpdateAvailable

Fired when an update for the browser is available, but isn't installed immediately because a browser restart is required.

runtime.onConnect

Fired when a connection is made with either an extension process or a content script.

runtime.onConnectExternal

Fired when a connection is made with another extension.

runtime.onUserScriptConnect

Fired when a connection is made with a user script registered by the extension.

runtime.onMessage

Fired when a message is sent from either an extension process or a content script.

runtime.onMessageExternal

Fired when a message is sent from another extension. Cannot be used in a content script.

runtime.onUserScriptMessage

Fired when a message is sent from a user script registered by the extension.

runtime.onPerformanceWarning

Fired when a runtime performance issue is detected for the extension.

runtime.onRestartRequired

Fired when the device needs to be restarted.

Example extensions

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
runtime
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote
footnote Before version 54, 'id' was the add-on's internal UUID, not the add-on ID.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote
footnote Before version 54, 'id' was the add-on's internal UUID, not the add-on ID.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender.documentId
Chrome – Full support
Chrome 106 (Release date: 2022-09-27)
footnote Full support
Edge – Full support
Edge 106 (Release date: 2022-10-03)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 92 (Release date: 2022-10-19)
footnote Full support
Safari – Full support
Safari 18.4 (Release date: 2025-03-31)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
MessageSender.documentLifecycle
Chrome – Full support
Chrome 106 (Release date: 2022-09-27)
footnote Full support
Edge – Full support
Edge 106 (Release date: 2022-10-03)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 92 (Release date: 2022-10-19)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
MessageSender.frameId
Chrome – Full support
Chrome 41 (Release date: 2015-03-03)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 28 (Release date: 2015-03-10)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender.id
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender.origin
Chrome – Full support
Chrome 80 (Release date: 2020-02-04)
footnote Full support
Edge – Full support
Edge 80 (Release date: 2020-02-07)
footnote Full support
Firefox – Full support
Firefox 126 (Release date: 2024-05-14)
footnote Full support
Opera – Full support
Opera 67 (Release date: 2020-03-03)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 126 (Release date: 2024-05-14)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender.tab
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
MessageSender.tlsChannelId
Chrome – Full support
Chrome 32 (Release date: 2014-01-14)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 19 (Release date: 2014-01-28)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
MessageSender.url
Chrome – Full support
Chrome 28 (Release date: 2013-07-09)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
OnInstalledReason
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote
footnote Uses 'chrome_update' instead of 'browser_update'.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote Uses 'chrome_update' instead of 'browser_update'.
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote
footnote Uses 'chrome_update' instead of 'browser_update'.
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote
footnote Only supports 'install' and 'update'.
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote
footnote Only supports 'install' and 'update'.
OnPerformanceWarningCategory
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
OnPerformanceWarningSeverity
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
OnRestartRequiredReason
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
PlatformArch
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
PlatformInfo
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
PlatformInfo.nacl_arch
Chrome – Full support
Chrome 28 (Release date: 2013-07-09)
footnote
footnote This attribute is deprecated and is being removed from Google Chrome, following removal of Google Native Client.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote This attribute is deprecated and is being removed from Edge, following removal of Google Native Client.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote
footnote This attribute is deprecated and is being removed from Opera, following removal of Google Native Client.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
PlatformNaclArch
Chrome – Full support
Chrome 28 (Release date: 2013-07-09)
footnote
footnote This enum is deprecated and is being removed from Google Chrome, following removal of Google Native Client.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote This enum is deprecated and is being removed from Edge, following removal of Google Native Client.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote
footnote This enum is deprecated and is being removed from Opera, following removal of Google Native Client.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
PlatformOs
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Port
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Port.error
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 18 (Release date: 2024-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 52 (Release date: 2017-03-07)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18 (Release date: 2024-09-16)
footnote Full support
RequestUpdateCheckStatus
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
connect
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
connectNative
Chrome – Full support
Chrome 29 (Release date: 2013-08-20)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 50 (Release date: 2016-11-15)
footnote Full support
Opera – Full support
Opera 16 (Release date: 2013-08-27)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote
footnote See the Apple Developer Documentation for additional details.
Firefox for Android – No support
Firefox for Android
footnote
footnote Only available to privileged extensions in GeckoView 68 and later. See the GeckoView Docs for additional details.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote
footnote See the Apple Developer Documentation for additional details.
getBackgroundPage
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote
footnote If this is called from a page that is part of a private browsing window, such as a sidebar in a private window or a popup opened from a private window, then it will always return null.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote
footnote If this is called from a page that is part of a private browsing window, such as a sidebar in a private window or a popup opened from a private window, then it will always return null.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
getBrowserInfo
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote
footnote See bug 294455
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294455
getContexts
Chrome – Full support
Chrome 116 (Release date: 2023-08-15)
footnote Full support
Edge – Full support
Edge 116 (Release date: 2023-08-21)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote Full support
Opera – Full support
Opera 102 (Release date: 2023-08-23)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 294456
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294456
getFrameId
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 96 (Release date: 2022-01-11)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 16 (Release date: 2022-09-12)
footnote Full support
Firefox for Android – Full support
Firefox for Android 96 (Release date: 2022-01-11)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16 (Release date: 2022-09-12)
footnote Full support
getManifest
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote
footnote Returns null for missing values, and removes unsupported keys.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
getPackageDirectoryEntry
Chrome – Full support
Chrome 29 (Release date: 2013-08-20)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 16 (Release date: 2013-08-27)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
getPlatformInfo
Chrome – Full support
Chrome 29 (Release date: 2013-08-20)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 16 (Release date: 2013-08-27)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
getURL
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
getVersion
Chrome – Full support
Chrome 143 (Release date: 2025-12-02)
footnote Full support
Edge – Full support
Edge 143 (Release date: 2025-12-05)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1992418
Opera – Full support
Opera 127 (Release date: 2026-02-02)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1992418
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
id
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
lastError
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote
footnote lastError is not an Error object. Instead, it is a plain Object with the error text as the string value of the message property.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote lastError is not an Error object. Instead, it is a plain Object with the error text as the string value of the message property.
Firefox – Full support
Firefox 47 (Release date: 2016-06-07)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote
footnote lastError is not an Error object. Instead, it is a plain Object with the error text as the string value of the message property.
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote
footnote lastError is only set if a callback is used. Promise results that fail will be rejected with an Error object.
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote
footnote lastError is only set if a callback is used. Promise results that fail will be rejected with an Error object.
onBrowserUpdateAvailable
Chrome – Full support
Chrome 27 (Release date: 2013-05-21)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onConnect
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
onConnectExternal
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 54 (Release date: 2017-06-13)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote
footnote Only fired in response to connect from webpages allowed in externally_connectable.
Firefox for Android – Full support
Firefox for Android 54 (Release date: 2017-06-13)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote
footnote Only fired in response to connect from webpages allowed in externally_connectable.
onInstalled
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote
footnote Before version 55, this event is not triggered for temporarily installed add-ons.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 52 (Release date: 2017-03-07)
footnote
footnote Before version 55, this event is not triggered for temporarily installed add-ons.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
onInstalled.details
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 52 (Release date: 2017-03-07)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
details.id
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
details.previousVersion
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 55 (Release date: 2017-08-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 55 (Release date: 2017-08-08)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
details.reason
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 52 (Release date: 2017-03-07)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
details.temporary
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 55 (Release date: 2017-08-08)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote
footnote See bug 294457
Firefox for Android – Full support
Firefox for Android 55 (Release date: 2017-08-08)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294457
onMessage
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Respond with Promise
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 62 (Release date: 2018-09-05)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 62 (Release date: 2018-09-05)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
onMessageExternal
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 54 (Release date: 2017-06-13)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Partial support
Safari 14 – 15.3 (Release date: 2020-09-16)
footnote Partial support
footnote Only fired in response to a message from an extension's containing app, not webpages and other extensions.
Safari – Partial support
Safari 15.4 (Release date: 2022-03-14)
footnote Partial support
footnote Also fired in response to a message from webpages allowed in externally_connectable.
Firefox for Android – Full support
Firefox for Android 54 (Release date: 2017-06-13)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 15 – 15.3 (Release date: 2021-09-20)
footnote Partial support
footnote Only fired in response to a message from an extension's containing app, not webpages and other extensions.
Safari on iOS – Partial support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Partial support
footnote Also fired in response to a message from webpages allowed in externally_connectable.
Respond with Promise
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 62 (Release date: 2018-09-05)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 62 (Release date: 2018-09-05)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
onPerformanceWarning
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
onRestartRequired
Chrome – Full support
Chrome 29 (Release date: 2013-08-20)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 16 (Release date: 2013-08-27)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onStartup
Chrome – Full support
Chrome 23 (Release date: 2012-11-06)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 52 (Release date: 2017-03-07)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 52 (Release date: 2017-03-07)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
onSuspend
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 100 (Release date: 2022-05-03)
footnote
footnote This event does not fire until Firefox 106, when event pages are available.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 294458
Firefox for Android – Full support
Firefox for Android 100 (Release date: 2022-05-03)
footnote
footnote This event does not fire until Firefox for Android 106, when event pages are available.
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294458
onSuspendCanceled
Chrome – Full support
Chrome 22 (Release date: 2012-09-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 100 (Release date: 2022-05-03)
footnote
footnote This event does not fire until Firefox 106, when event pages are available.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 294458
Firefox for Android – Full support
Firefox for Android 100 (Release date: 2022-05-03)
footnote
footnote This event does not fire until Firefox for Android 106, when event pages are available.
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294458
onUpdateAvailable
Chrome – Full support
Chrome 25 (Release date: 2013-02-21)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
onUserScriptConnect
Chrome – Full support
Chrome 120 (Release date: 2023-12-05)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Edge – Full support
Edge 120 (Release date: 2023-12-07)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Firefox – Full support
Firefox 136 (Release date: 2025-03-04)
footnote
footnote Available for use with Manifest V3 only.
footnote Requires the userScripts permission.
Opera – Full support
Opera 106 (Release date: 2023-12-19)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
onUserScriptMessage
Chrome – Full support
Chrome 120 (Release date: 2023-12-05)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Edge – Full support
Edge 120 (Release date: 2023-12-07)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Firefox – Full support
Firefox 136 (Release date: 2025-03-04)
footnote
footnote Available for use with Manifest V3 only.
footnote Requires the userScripts permission.
Opera – Full support
Opera 106 (Release date: 2023-12-19)
footnote
footnote Available for use with Manifest V3 only.
footnote Always available, even if the extension has no way of firing the event.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
openOptionsPage
Chrome – Full support
Chrome 42 (Release date: 2015-04-14)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 48 (Release date: 2016-08-02)
footnote Full support
Opera – Full support
Opera 29 (Release date: 2015-04-28)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 57 (Release date: 2017-11-28)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
reload
Chrome – Full support
Chrome 25 (Release date: 2013-02-21)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
requestUpdateCheck
Chrome – Full support
Chrome 25 (Release date: 2013-02-21)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
sendMessage
Chrome – Full support
Chrome 26 (Release date: 2013-03-26)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote Full support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
sendMessage.options
Chrome – Full support
Chrome 32 (Release date: 2014-01-14)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 19 (Release date: 2014-01-28)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
options.includeTlsChannelId
Chrome – Full support
Chrome 32 (Release date: 2014-01-14)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 45 (Release date: 2016-03-08)
footnote Full support
Opera – Full support
Opera 19 (Release date: 2014-01-28)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
sendNativeMessage
Chrome – Full support
Chrome 29 (Release date: 2013-08-20)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 50 (Release date: 2016-11-15)
footnote Full support
Opera – Full support
Opera 16 (Release date: 2013-08-27)
footnote Full support
Safari – Full support
Safari 14 (Release date: 2020-09-16)
footnote
footnote See the Apple Developer Documentation for additional details.
Firefox for Android – No support
Firefox for Android
footnote
footnote Only available to privileged extensions in GeckoView 68 and later. See the GeckoView Docs for additional details.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote
footnote See the Apple Developer Documentation for additional details.
setUninstallURL
Chrome – No support
Chrome 41 – 114 (Release date: 2015-03-03)
footnote The maximum length is 255 characters.
Chrome – Full support
Chrome 115 (Release date: 2023-07-18)
footnote
footnote The maximum length is 1023 characters.
Edge – No support
Edge 79 – 114 (Release date: 2020-01-15)
footnote The maximum length is 255 characters.
Edge – Full support
Edge 115 (Release date: 2023-07-21)
footnote
footnote The maximum length is 1023 characters.
Firefox – No support
Firefox 47 – 115 (Release date: 2016-06-07)
footnote The maximum length is 255 characters.
Firefox – Full support
Firefox 116 (Release date: 2023-08-01)
footnote
footnote The maximum length is 1023 characters.
Opera – No support
Opera 28 – 100 (Release date: 2015-03-10)
footnote The maximum length is 255 characters.
Opera – Full support
Opera 101 (Release date: 2023-07-26)
footnote
footnote The maximum length is 1023 characters.
Safari – Partial support
Safari 14 (Release date: 2020-09-16)
footnote Partial support
footnote API exists, but has no effect.
Firefox for Android – No support
Firefox for Android 48 – 115 (Release date: 2016-08-02)
footnote The maximum length is 255 characters.
Firefox for Android – Full support
Firefox for Android 116 (Release date: 2023-08-01)
footnote
footnote The maximum length is 1023 characters.
Safari on iOS – Partial support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Partial support
footnote API exists, but has no effect.

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
See implementation notes.
Has more compatibility info.

Note: This API is based on Chromium's chrome.runtime API. This documentation is derived from runtime.json in the Chromium code.