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?

1 Answer 1

0

Safari (17.1, at the time of writing this answer) still does not support any form of push or local notifications inside Safari Web/App Extensions.

Although Safari 16 has introduced the relevant Notifications API (including Web Push API), it is available only for regular websites, and not for Safari Web/App extensions. The legacy Safari Push Notifications are also available only for regular websites and not for extensions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.