Firefox 50 landed in Developer Edition this week, so we have another update on WebExtensions for you!Please use the WebExtensions API for any new add-on development, and consider porting your existing add-ons as soon as possible.
It’s also a great time to port because WebExtensions is compatible with multiprocess Firefox, which began rolling out in Firefox 48 to people without add-ons installed. When Firefox 49 reaches the release channel in September, we will begin testing multiprocess Firefox with add-ons. The goal is to turn it on for everyone in January 2017 with the release of Firefox 51.
If you need help porting to WebExtensions, please start with the compatibility checker, and check out these resources.
Since the last release, more than 79 bugs were closed on WebExtensions alone.
API Changes
In Firefox 50, a few more history APIs landed: the getVisits function, and two events–onVisited and onVisitRemoved.
Content scripts in WebExtensions now gain access to a few export helpers that existed in SDK add-ons: cloneInto, createObjectIn and exportFunction.
The webNavigation API has gained event filtering. This allows users of the webNavigation API to filter events based on some criteria. Details on the URL Filtering option are available here.
There’s been a change to debugging WebExtensions. If you go to about:debugging and click on debug you now get all the Firefox Developer Tools features that are available to you on a regular webpage.
Why is this significant? Besides providing more developer features, this will work across add-on reloads and allows the debugging of more parts of WebExtensions. More importantly, it means that we are now using the same debugger that the rest of the Firefox Dev Tools team is using. Reducing duplicated code is a good thing.
As mentioned in an earlier blog post, native messaging is now available. This allows you to communicate with other processes on the host’s operating system. It’s a commonly used API for password managers and security software, which need to communicate with external processes.
Documentation
The documentation for WebExtensions has been updated with some amazing resources over the last few months. This has included the addition of a few new areas:
- How-to pages describing how to intercept HTTP requests, modify a web page, and so on.
- Detailed instructions on porting, including porting a Chrome extension and porting a legacy Firefox add-on.
- There are also some detailed pages comparing WebExtensions to SDK or legacy add-ons.
- An excellent comparison of what browser implements which APIs, which includes data for Microsoft Edge, Google Chrome as well as Firefox and Firefox for Android.
The documentation is hosted on MDN and updates or improvements to the documentation are always welcome.
There are now 17 example WebExtensions on github. Recently added are history-deleter and cookie-bg-picker.
What’s coming
We are currently working on the proxy API. The intent is to ship a slightly different API than the one Chrome provides because we have access to better APIs in Firefox.
The ability to write WebExtensions APIs in an add-on has now landed in Firefox 51 through the implementation of WebExtensions Experiments. This means that you don’t need to build and compile all of Firefox in order to add in new APIs and get involved in WebExtensions. The policy for this functionality is currently under discussion and we’ll have more details soon.
There are also lots of other ways to get involved with WebExtensions, so please check them out!
Kostrzyn wrote on
Syinea wrote on
Jorge wrote on
Andy McKay wrote on