Re:How to convert existing web extensions for Safari
by _qulr on Tuesday January 05, 2021 @06:54PM
(#25652998)
> Chrome extensions only support the 'chrome' namespace, while Firefox supports 'chrome' and 'browser', but Safari 14 only supports 'browser'.
According to the documentation, "Safari web extensions support both the chrome.* and browser.* namespaces." https://developer.apple.com/documentation/safariservices/saf...
Chrome extensions only support the 'chrome' namespace, while Firefox supports 'chrome' and 'browser', but Safari 14 only supports 'browser'. So our extension had been using the 'chrome' namespace which worked under Firefox, but now needed to be converted. 'chrome' uses callback functions, while 'browser' uses Promises. So you have to port your Chrome extension to use 'browser' and use the following polyfill: https://github.com/mozilla/webextension-polyfill
Here's some incompatibilities between Chrome and Firefox to consider: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
Also had some html/css glitches to fix in Safari. Some other issues others have mentioned such as notifications and webRequest APIs.