Open saschanaz opened 7 months ago
Are you talking about https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification?
I think the difference is somewhat observable as the permission check TypeError
comes from a task. And I think that's somewhat important as we wouldn't want to require synchronous IPC for a permission check.
Hmm, it seems both Blink and WebKit indeed tries to synchronously ping something outside of the current thread, although I don't think Gecko does that (as we propagate permissions beforehand). I'm not sure anyone would be actually interested to fix that, but maybe the spec shouldn't force the sync behavior either.
Yeah, I don't think we should force synchronizing permissions whenever we can avoid it.
Should we add a note?
Maybe, but we're not terribly consistent about this at the moment. E.g., Notification.permission
does require active synchronization.
There might be some ways to get rid of that (at some point there was a proposal to always return "default
" there), but thus far nobody has.
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:
This does not change any visible exception order as both throw TypeError, but maybe worth changing the spec to reflect reality?