WebExtensions
Jump to navigation
Jump to search
This page is an introduction to Mozilla's implementation of a new browser extension API. The goals of this API are:
- It should be easier to use.
- It must be compatible with multiprocess Firefox (Electrolysis).
- Porting add-ons to and from other browsers should be easier.
- Changes to Firefox's internal code should be less likely to break add-ons.
- It should be easier to review add-ons to reduce the backlog on addons.mozilla.org.
Much of the specifics of the new API are similar to the Chrome extension API. Google has extensive documentation on the API.
We hope to ship a preliminary version of this API in Firefox 42.
For the time being, extensions will still be packaged as .xpi files. The .xpi file will contain the same files as the Chrome extension, including manifest.json. It will also include bootstrap.js and install.rdf files that allow it to be loaded into Firefox.
List of supported APIs
- alarms
- browserAction
- We don't support the imageData attribute on setIcon.
- We don't support enable or disable.
- extension
- We support only getBackgroundPage and getURL.
- i18n
- We support only getMessage in the JavaScript API.
- We only support @@extension_id and @@ui_locale predefined messages.
- We don't localize CSS files.
- Strings to be localized must consist entirely of __MSG_foo__ in order for a substitution to be made.
- notifications
- The only supported notification options are iconUrl, title, and message.
- The only methods we support are create, clear, and getAll.
- The only event we support is onClosed. We don't provide byUser data.
- runtime
- storage
- tabs
- webNavigation
- webRequest
- windows
List of APIs we will likely support in the future
Custom APIs for Firefox
We plan to add our own APIs based on the needs of existing Firefox add-ons.
- Sidebars
- Toolbars
- Keyboard shortcuts