ConstinTrue for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
ConstlastSet for the lifetime of a callback if an ansychronous extension api has resulted in an error. If no error has occured lastError will be undefined.
ConstonFired when a request is sent from either an extension process or a content script.
ConstonFired when a request is sent from another extension.
Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page.
Converts a relative path within an extension install directory to a fully-qualified URL.
A path to a resource within an extension expressed relative to its install directory.
The fully-qualified URL to the resource.
Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.
OptionalfetchProperties: _GetViewsFetchPropertiesArray of global objects
Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
The
browser.extensionAPI has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.