Apple Safari 15.4 brings extension Manifest v3 support
Apple Safari 15.4 is the first version that adds support for “manifest_version: 3”. Apple is jumping on the Manifest v3 train and it’s great news for browser extension developers. We will be able to use the same extension code on all major browsers: Chrome, Edge, Firefox and Safari.
Here is what Apple added in Safari 15.4 for web extensions:
- service_worker background scripts as an alternative to non-persistent background pages
- Script and style injection via the browser.scripting APIs
- Dynamic and session rules via the browser.declarativeNetRequest APIs
- Webpage-to-extension messaging using externally_connectable:matches
Web extensions fixes in Safari 15.4 update:
- Limits are now enforced on the size and number of items in extension sync storage
- More directives are now allowed to be included in the content_security_policy of an extension’s manifest, such as the sandbox directive
- Special matching characters (*, |, ||, and ^) in urlFilter of declarativeNetRequest rules are now handled, instead of being treated as regex patterns
- Promise returns from runtime.onMessage listeners are now allowed for the message reply
I am yet to try to port my v3 extensions to Safari. I am planning to do that soon and report how it goes.