Extensions
The WebDriver BiDi specification provides a flexible framework that allows browser vendors to define custom modules and arguments. This document outlines the Firefox-specific extensions implemented in WebDriver BiDi, including any custom functionality beyond the core specification.
Modules
There are currently no custom modules defined in the Firefox implementation of WebDriver BiDi.
Commands
Firefox provides additional commands for certain modules, as detailed in the list below.
webExtension.moz:listExtensions
Returns an array of WebExtension information objects. Hidden extensions are excluded. Non-hidden extensions are included even when disabled.
policy and sourceURL are only returned when RemoteAgent.allowSystemAccess
is true. Otherwise, both fields are omitted.
webExtension.ListExtensionsResult = {
extensions: [*webExtension.ExtensionInfo],
}
webExtension.ExtensionInfo = {
id: text,
name: text,
version: text,
manifestVersion: uint,
isActive: bool,
isSystem: bool,
hidden: bool,
temporarilyInstalled: bool,
? sourceURL: text / null,
? policy: webExtension.ExtensionPolicyInfo / null,
}
webExtension.ExtensionPolicyInfo = {
uuid: text,
baseURL: text,
extensionURL: text,
backgroundScripts: [*text],
}
Description:
manifestVersion: The manifest version used by the WebExtension. It stays available even when the WebExtension has no activeWebExtensionPolicy.hidden: True if the WebExtension should not be shown to the user, for instance because it is provided by the application.temporarilyInstalled: True if the WebExtension is installed temporarily, ie. it will be uninstalled when the browser shuts down.sourceURL: The URL of the source the WebExtension was installed from, ornullif unknown.policy: Details derived from the WebExtensionPolicy. It isnullif the WebExtension has no activeWebExtensionPolicy, for instance when the extension is disabled.isActivereflects the enabled state of the WebExtension.
Inside policy:
uuid: The uuid used for the WebExtension’smoz-extension:URLs.baseURL: Thefile:orjar:URL used as the base of the WebExtension’smoz-extension:URL root.extensionURL: The root URL of the WebExtension’smoz-extension:namespace, ie.moz-extension://<uuid>/.backgroundScripts: The paths of the WebExtension’s background scripts, or an empty array if it has none.
Parameters
Firefox provides additional parameters for certain commands, as detailed in the list below.
webExtension.install
webExtension.InstallParameters = {
extensionData: webExtension.ExtensionData,
? moz:allowPrivateBrowsing: bool .default false,
? moz:permanent: bool .default false,
}
Description:
moz:allowPrivateBrowsing: When set totrue, the web extension will be allowed in private browsing mode.moz:permanent: When set totrue, the web extension will be installed permanently. This requires the extension to be signed. Unsigned extensions can only be installed temporarily, which is the default behavior.