WebExtensions : the converged future of browser addons

Firefox since FF48 is now proposing the Webextension API which allow to reuse chrome code and APIs with little changes making chrome addons code "99% compatible" with Firefox. Note that Edge the last Windows browser also accepts chrome-like APIs.

Hints:
- there are a couple of modifications that still need to be brought to the chrome addon repo to make them totally usable in the Firefox context:

1/ locales

2/ manifest.json
2.1 gecko id
This one is required by the AMO website to allow registration. Firefox contrary to Chome uses a string id to uniquely identify an addon.

2.2 gecko update_url
Don't forget to set this property if you don't host your addon on the AMO site !

2.3 web_available_resources
The chrome manifest file admits wildcards for making resource available, this is not the case for Firefox where you have to explicit mention file names.

3/ some APIs like "notifications" claimed as supported by Firefox return some strange error messages when trying to load/sign An addon on AMO website. Forget about it and switch to the web standard notification API, documentation here.

4/ Misc: 
Chrome developers will find it hard to develop and troubleshoot on Firefox. The web-ext command will help bridge the gap though. The cmd line signing is definitely one of those.


Notes:
- the other Firefox APIs will be deprecated starting end of 2017
- Firefox developers will have to take special care with addons manipulating preferences and specifically browser preferences. No support to the known preference FF API is indeed planned.

Useful links:

Comments

Popular posts from this blog

Extending an extension with a native app.

Filtering console messages in the chrome devtools window

Intercepting file download in chrome