0

I'm attempting to convert an extension from Chrome/Firefox to Safari. Having followed instructions here, everything seems to work except for notifications.

chrome.notifications is undefined in Safari, both for manifest v2 and v3. In a v3 extension's service worker, Notification (the API for web workers) is accessible, though that requires that I request permission to use it. I can see how that makes sense for a web worker. I don't think it makes sense for an extension whose permissions were already approved before installation. But, maybe these are different APIs meant for different tasks, and Safari simply has not or does not plan to implement browser.notifications.

Basically, in order to use registration.showNotification in a web extension for Safari, it seems I need to request additional permission from the user via a gesture. That means they need to install the extension and then separately activate that preference on their own. Do I have that right?

Rob Hawkins
  • 451
  • 1
  • 5
  • 17

0 Answers0