You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) Let promise be a new promise.
(2) Let notification be the result of creating a notification given title and options. Rethrow any exceptions.
(3) If context object's active worker is null, reject promise with a TypeError exception.
I see that WebIDL defines some additional steps for promises - if a function returning a Promise value throws an exception, rather than throwing the exception it'll reject the promise.
Can we change the showNotification() algorithm to point this out explicitly? I found this rather confusing, and it took me quite a while to figure out where that behavior comes from.
Loosely following the fetch spec's formulation, what about the following amendment to the showNotification() steps?
Let notification be the result of creating a notification given title and options. If that threw an exception, reject promise with that exception.
The text was updated successfully, but these errors were encountered:
(editorial)
https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification
I see that WebIDL defines some additional steps for promises - if a function returning a Promise value throws an exception, rather than throwing the exception it'll reject the promise.
Can we change the
showNotification()
algorithm to point this out explicitly? I found this rather confusing, and it took me quite a while to figure out where that behavior comes from.Loosely following the fetch spec's formulation, what about the following amendment to the showNotification() steps?
notification
be the result of creating a notification given title and options. If that threw an exception, rejectpromise
with that exception.The text was updated successfully, but these errors were encountered: