Re: [w3c/ServiceWorker] Better hooks for functional events (Issue #1808)

yoshisatoyanagisawa left a comment (w3c/ServiceWorker#1808)

I've looked at the Push API specification in light of this issue.

The "run the following steps in parallel" section in the Push API seems to be what `postDispatchSteps` is intended for, but this is not explicit, which makes the specification harder to follow.

Furthermore, the current algorithm checks `has showNotification() been successfully invoked` regardless of whether the event's `waitUntil` promises resolve or reject. I believe this check should ideally only occur on successful resolution. This highlights the need for a mechanism that allows the caller to more easily differentiate between a promise's fulfillment and rejection.

I also agree that the `Fire Functional Event` algorithm would be much clearer if it used named arguments via a single dictionary object. Do you have any examples in mind?  Is the dictionary-based approach like `AddEventListenerOptions` in `addEventListener()` the kind of solution you have in mind?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1808#issuecomment-3579312073
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1808/3579312073@github.com>

Received on Wednesday, 26 November 2025 05:48:11 UTC