Post

Replies

Boosts

Views

Activity

Reply to SFSafariApplication.openWindow(with:) not working
Is your extension Web Extension format or Safari App Extension? In the case of Web Extensions, ensure you have proper permissions in your manifest. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows (window api docs if you really want to open a new window) Create a new tab with Web Extension: browser.tabs.create({url: "https://www.apple.com"}, response => { // ... }); Create new tab with Safari App Extensions: func openTab() { guard let url = URL(string: "https://apple.com/") else { return } SFSafariApplication.getActiveWindow { (window) in window?.openTab(with: url, makeActiveIfPossible: true) { (tab) in // ... } } }
Topic: Safari & Web SubTopic: General Tags:
Feb ’22
Reply to Download attribute not working in web extension popup
Are there any updates to this? This also affects bundled html extension pages within a web extension. Using the Safari App Extension API (as compared to the Web Extension API), it is possible to download arbitrary files using the method above, but with the Web Extension API, the download attribute is not respect and a new tab opens with the download content.
Topic: App & System Services SubTopic: General Tags:
May ’22
Reply to Adoption of New MV3 Standards for Browser Extensions
Good questions. Just a note: header-based modifications in the coming days Even with mv2, Safari lacks some of the implementation for modifying headers compared to all other modern browsers. You can check out the support on the MDN docs for webRequest which I believe is deprecated in favor of declarativeNetRequest. I've used declarativeNetRequest with both mv2 and mv3 Safari extensions and was disappointed to see that header modification still lacks with that API implementation. action.type: "modifyHeaders" is not supported as of writing this comment :/ I'm hopeful they will reverse their current stance on header modifications.
Topic: Safari & Web SubTopic: General Tags:
Jul ’22
Reply to SFSafariApplication.openWindow(with:) not working
Is your extension Web Extension format or Safari App Extension? In the case of Web Extensions, ensure you have proper permissions in your manifest. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows (window api docs if you really want to open a new window) Create a new tab with Web Extension: browser.tabs.create({url: "https://www.apple.com"}, response => { // ... }); Create new tab with Safari App Extensions: func openTab() { guard let url = URL(string: "https://apple.com/") else { return } SFSafariApplication.getActiveWindow { (window) in window?.openTab(with: url, makeActiveIfPossible: true) { (tab) in // ... } } }
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Download attribute not working in web extension popup
Are there any updates to this? This also affects bundled html extension pages within a web extension. Using the Safari App Extension API (as compared to the Web Extension API), it is possible to download arbitrary files using the method above, but with the Web Extension API, the download attribute is not respect and a new tab opens with the download content.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Adoption of New MV3 Standards for Browser Extensions
Good questions. Just a note: header-based modifications in the coming days Even with mv2, Safari lacks some of the implementation for modifying headers compared to all other modern browsers. You can check out the support on the MDN docs for webRequest which I believe is deprecated in favor of declarativeNetRequest. I've used declarativeNetRequest with both mv2 and mv3 Safari extensions and was disappointed to see that header modification still lacks with that API implementation. action.type: "modifyHeaders" is not supported as of writing this comment :/ I'm hopeful they will reverse their current stance on header modifications.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to HTML Download Attribute using data URI
This is still an issue. How can we allow users to download arbitrary files from an extension page/popup??
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’22