Use webextension-polyfill
Closed this issue · 0 comments
oslego commented
Web extensions use the browser
namespace which has a very similar API naming to the chrome
namespace used in Chrome, but with a Promise-based API instead of the callback-based one.
To provide an inter-operable web extension source for both Firefox and Chrome, the code in this repository currently uses a minimal manual mapping between chrome
and browser
namespaces for the few methods used here.
Consider using the https://github.com/mozilla/webextension-polyfill to replace this manual mapping and ensure uniform support of the Promise-based browser
API for web extensions across browsers. While not explicitly supported, Opera and the Chromium-based Edge browsers should work out of the box in most scenarios.