Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
Extensions developed with WebExtension APIs are designed for cross-browser compatibility: to a large extent, the technology is directly code-compatible with the extension API supported by Google Chrome and Opera. Extensions written for these browsers will, in most cases, run in Firefox with just a few changes. Almost all of the WebExtension APIs are supported using callback functions under the
chrome namespace, the same as Chrome. The only APIs which are not supported in the
chrome namespace are those which are intentionally incompatible with Chrome. In those few cases, the API documentation page will explicitly state that it's only supported in the
browser namespace. The process of porting an extension from Chrome or Opera is like this:
- Review your use of manifest.json features and WebExtension APIs against the Chrome incompatibilities reference. If you're using features or APIs that are not yet supported in Firefox, you may not be able to port your extension yet. Mozilla provides a service that can help to automate this step: https://www.extensiontest.com/.
- Install your extension in Firefox and test it out.
- If you have any problems, contact us on the dev-addons mailing list or #webextensions on IRC.
- Submit your add-on to AMO for signing and distribution.
If you were relying on Chrome's command line option for loading an unpacked extension, check out the web-ext tool which automates temporary installation in Firefox for development.