-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
What is the issue with the Notifications API Standard?
The current spec in https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification creates a notification in step 5 and do the permission check in step 6 where checks for options bag happen. But in reality:
- Gecko checks permission first: https://searchfox.org/mozilla-central/rev/b94e479d0b79b157029379832d05229df646e134/dom/notification/Notification.cpp#2210-2234
- Blink checks permission first too: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/notifications/service_worker_registration_notifications.cc;l=61-74;drc=08bac9d4c75f023df86a07be1986884f760dab94
- WebKit too: https://searchfox.org/wubkat/rev/25be8d6371093c7bc40042867d31fcb62659346c/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp#300-311 (although there's no renotify/vibrate support there to actually make a difference)
This does not change any visible exception order as both throw TypeError, but maybe worth changing the spec to reflect reality?
Metadata
Metadata
Assignees
Labels
No labels