Post

Replies

Boosts

Views

Activity

Reply to Differences between Safari App extension and Safari Web extension.
Safari Web Extension does not fully implement the web extension APIs -- some implementation details deviate from the spec e.g. no runtime.onMessageExternal https://developer.apple.com/forums/thread/681378 difficult to implement an OAuth flow due to no reachable extension-specific URL https://developer.apple.com/forums/thread/670165 Safari-specific implementation of runtime.sendNativeMessage And APIs get broken from time to time e.g. : storage.local.get behaves unexpectedly on Safari 18 https://developer.apple.com/forums/thread/765169 same for tabs.onRemoved on Safari 18 https://developer.apple.com/forums/thread/765343 Collectively, this makes it very difficult to develop JS web extensions for Safari.
Topic: Safari & Web SubTopic: General
Oct ’24
Reply to Browser extension stops working on Safari 15.4 version
I have experienced a similar issue where a number of web extensions stop working on Safari 15.4. A deeper investigation shows that this is likely a Safari issue in breaking the web extension 'tabs' API: chrome.tabs.create doesn't work when the url is a page that's packaged with an extension. It seems to crash and ruin all chrome.tabs event handlers. Reproducible scenario: chrome.tabs.onActivated.addListener(()=> console.log('new active tab')) .. Note: I use onActivated just to test whether event listeners on tabs still works. Switching between tabs.. You should see the 'new active tab' printed in the console. chrome.tabs.create({url: chrome.runtime.getURL('/index.html')}) --> a new tab is created. Note: index.html is an html file packaged in your extension. Switching between tabs.. Expect: 'new active tab' printed in the console as usual Actual: no 'new active tab' printed in the console… Note: this problem does not occur when the url is a public reachable URL, nor on Safari 15.3 Version 15.4 (17613.1.17.1.13) Please fix.
Topic: Safari & Web SubTopic: General Tags:
Apr ’22
Reply to Safari Web Extensions: storage.local.get unexpectedly returns undefined
Fixed in Safari 18.0.1
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to How to secure the Safari web extension?
Whatever best practice materials you found on Firefox / Chrome are mostly applicable for Safari Web Extension too as they share the similar APIs.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to safari web extension- managed storage
storage.managed is not supported in Safari as also stated in MDN.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Differences between Safari App extension and Safari Web extension.
Safari Web Extension does not fully implement the web extension APIs -- some implementation details deviate from the spec e.g. no runtime.onMessageExternal https://developer.apple.com/forums/thread/681378 difficult to implement an OAuth flow due to no reachable extension-specific URL https://developer.apple.com/forums/thread/670165 Safari-specific implementation of runtime.sendNativeMessage And APIs get broken from time to time e.g. : storage.local.get behaves unexpectedly on Safari 18 https://developer.apple.com/forums/thread/765169 same for tabs.onRemoved on Safari 18 https://developer.apple.com/forums/thread/765343 Collectively, this makes it very difficult to develop JS web extensions for Safari.
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
Oct ’24
Reply to OAuth Redirect URL in (the new) Safari Web Extension
for @rtolton, this is an example code: browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { if (changeInfo.url && changeInfo.url === 'your-reachable-redirect-url') { // do your post sign-in ceremony // e.g. take authCode from the query param, etc. } })
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Browser extension stops working on Safari 15.4 version
I have experienced a similar issue where a number of web extensions stop working on Safari 15.4. A deeper investigation shows that this is likely a Safari issue in breaking the web extension 'tabs' API: chrome.tabs.create doesn't work when the url is a page that's packaged with an extension. It seems to crash and ruin all chrome.tabs event handlers. Reproducible scenario: chrome.tabs.onActivated.addListener(()=> console.log('new active tab')) .. Note: I use onActivated just to test whether event listeners on tabs still works. Switching between tabs.. You should see the 'new active tab' printed in the console. chrome.tabs.create({url: chrome.runtime.getURL('/index.html')}) --> a new tab is created. Note: index.html is an html file packaged in your extension. Switching between tabs.. Expect: 'new active tab' printed in the console as usual Actual: no 'new active tab' printed in the console… Note: this problem does not occur when the url is a public reachable URL, nor on Safari 15.3 Version 15.4 (17613.1.17.1.13) Please fix.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to The tabs.onUpdated extension API is not fully supported.
This problem seems to be resolved in Safari Version 15.4 (17613.1.17.1.6).
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22