Web Extensions are the new thing in the world of extensions and browser add-ons. Mozilla has officially announced that it will stop supporting add-ons and move completely to web extensions by the start of 2018.

In the days of yore (well, actually not so long ago, but technology changes so fast, so..) if you wanted to develop a browser extension you had to make different ones for each browser - Chrome, Firefox, Opera, Safari, Internet Explorer (who even uses it nowadays! even Microsoft has switched to Edge. But we are talking of days of yore..). This was a major obstacle for all who wanted to add a feature to the browser.

Now, the amazing Mozilla Foundation has come up with Web Extensions (https://developer.mozilla.org/en-US/Add-ons/WebExtensions). This has greatly reduced the effort to build multiple browser compatible extensions. Safari extension development requires you to sign up for apple developer program and learn Objective-C or Swift. But then one is not restricted to Safari alone in a Mac. So yaay! web extensions are here!!!

One only needs to know javascript to develop a web extension of their own. Also, the web extension APIs (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API).

And what’s more, if you have a chrome extension right now, it is just a piece of cake to convert it into a web extension. Major changes include the browser. API instead of chrome. API and promises instead of callbacks. Once you have done these changes all you need is to add a browser polyfill (https://github.com/mozilla/webextension-polyfill) and include it before all your content and background scripts to run your extensions in chrome. What’s more surprising is that edge supports web extensions with some minor modifications (https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/creating-an-extension).

So next time you think of developing a chrome extension, make it a web extension, because that is where the future of extensions lie. I am pretty sure Safari will come down this road couple of years later, or maybe not.

To track what APIs are coming in next versions of Firefox follow this trello board (https://trello.com/b/PC9kB14s/webextensions-roadmap). Firefox 54 is one major update which will enable extensions to use the developer tools API and one which I am eagerly waiting for!

Update: It’s been almost a year and a half since I wrote this. Web Extensions are fairly simple to develop and I have successfully developed a couple of complex extensions (it’s not out in the open world). Feel free to message me or leave a comment in case you need any help on developing extensions.

Software Engineer focused on web technologies.