While WebExtensions will remain in a beta state in Firefox 47, we’ve made lots of progress, with 81 bugs closed since the last update. As of this update, we are still on track for a milestone release in Firefox 48 when it hits Developer Edition.
There’s a new way for you to get involved! Tell us which APIs you’d like support for by filling out this survey, to help us better prioritize them. We have also created a wiki page filled with resources to support developers through all the changes coming in the add-ons world.
Adding keyboard shortcuts that trigger actions in your extension arrived with the partial implementation of commands. This allows developers to map key presses from the manifest to actions in your add-on.
With the partial implementation of downloads you can download files from your add-on and get updates of the download progress. You can also search through the existing downloads using the search API.
Several additions and changes in webRequest have been included in Firefox 47. These prelude even bigger news for add-ons that focus on security and privacy to work perform the sort of network inspection needed to do their job. More details on these changes are covered in Giorgio’s blog post.
More of the tabs API have been completed, including:
- The methods: executeScript, insertCSS, detectLanguage and captureVisibleTab.
- The events: onAttached, onDetached, onMoved and onHighlighted.
- The attributes: muted and audible
Several improvements have been made to the windows API, including :
- Added support for creating a new window from an existing tab, popup-type windows
- Querying and changing a windows’ minimized, maximized and fullscreen state.
All asynchronous methods which accept a callback function will now return a Promise if no callback is passed. These promises resolve at the same time a callback would normally be called, and reject with the value of lastError in cases where that would otherwise be set. Additionally, onMessage listeners may now return a Promise object if they wish to send a reply. When the promise resolves, its resolution value will be returned to the sender.
WebExtension manifests now support a “creator” property, which is displayed in the Add-on Manager, to indicate the author of the add-on. Additionally, manifests are now fully type-checked at startup, and any type errors or unexpected properties are reported to the Browser Console for inspection.
For the full list of API changes, please see the bug list.
Command line tool
A new command line tool is being build for WebExtensions, called “web-ext” will allow you to run, test and sign add-ons easily from the command line. For example to run your add-on in a new profile, from your add-on, just call: web-ext run.
This command line utility is in its early days, but you can follow along with web-ext development on github.
We’ve been preparing examples of our APIs on github. In the last few weeks we’ve added two more examples:
- bookmark-it: an add-on that toggles a bookmark for the currently active tab.
- tabs-tabs-tabs: an add-on that demonstrates some of the tabs APIs available (currently move, duplicate, reload and remove)
There are currently ten example add-ons available in the repository. All of them can be installed easily by cloning the repository locally and then installing temporarily through about:debugging.
Over the coming months we will work our way towards a beta in Firefox 47 and the first stable release in Firefox 48. If you’d like to jump in to help, or get your API added, please join us on our mailing list or at one of our public meetings. You can also check out this wiki to see more ways to participate in the evolution of WebExtensions.