extension
extension copied to clipboard
Support Safari14
The upcoming Safari14 will support web extensions. It may be worthwhile to look into whether we can support this browser with the current code. Safari14 will not support all API available in Firefox and Chrome in its first release. So some modification might be necessary. Safari web extensions need to be packaged as an app but there is a conversion tool for existing projects in the Xcode12 beta that just creates a bare minimum wrapper app that can be used to distribute the extension through the app store (the only way to distribute web extensions AFAIK).

I got this to work using the built in web extension converter in macOS 11, Safari 14 and the Xcode 12 toolkit. After yarn installing and building you can run
xcrun safari-web-extension-converter .
in the build directory. The only api not supported by safari is background.persistence == true. Would be cool to have this officially supported as I use Safari most of the time.
Really cool. Also on Mac, so I will definitely tale a look at some point - feel free to contribute additional/fixes to support this in the meantime, I always love contributions. (Especially if you are actually using it...)
The only api not supported by safari is background.persistence == true. Would be cool to have this officially supported as I use Safari most of the time.
I wonder, why does the extension use persistence at the first place?
I wonder, why does the extension use persistence at the first place?
The background script in the extension is constantly listening to messages coming from a Dapps (signing and others...).
I am not well-versed (not all all to be honest) in extension development but the documentation reads as if persistent
is not required for that.
The registration of listeners is persistent even without persistent
. When such a message from a Dapp arrives the background script would be loaded and unloaded when the processing is finished.
With significant overhead, yes. So there are very valid reasons why this extension (like other well known extensions in other blockchains) use persistence.
However since there is manifest 3 on the horizon and this approach is deprecated, it is due for removal, please see https://github.com/polkadot-js/extension/issues/310, as logged
Thanks for the explanation. It certainly feels sluggish on Safari (clicking the toolbar icon).
Any progress on this?
Really looking forward to this.
![]()
I got this to work using the built in web extension converter in macOS 11, Safari 14 and the Xcode 12 toolkit. After yarn installing and building you can run
xcrun safari-web-extension-converter .
in the build directory. The only api not supported by safari is background.persistence == true. Would be cool to have this officially supported as I use Safari most of the time.
By ITP policy, the indexedDB and localStorage will be cleared every 7days. Even with ITP disabled, the data will be deleted after each Safari upgrade.