msramalho / SigTools

📆 Sigarra Tools | An extension that makes the information system of the University of Porto slightly better.
https://chrome.google.com/webstore/detail/sigarra-to-calendar/piefgbacnljenipiifjopkfifeljjkme
Apache License 2.0
37 stars 0 forks source link

Standard WebExtensions API on the way? #91

Closed fabiodrg closed 2 years ago

fabiodrg commented 2 years ago

FINALLY! It seems W3C is working in a standard for web extensions. A bit late, but it is an important step to ease cross-browser extension development. Apparently the API will be based on JS Promises, just like we have on Firefox, so there's no need for the callback hell from the Chrome APIs...

I found this neat polyfill that I am using for another project, and so far so good: https://github.com/mozilla/webextension-polyfill.

I am not sure when the standard will be oficial and how long it will take for Chromium-based browsers to embrace the APIs, manifest, etc. I would say that the only reason to adopt the Polyfill and use the Firefox API (which is mostly compliant with the upcoming standard) is a preference on the API usage, i.e. callbacks vs promisses.