Skip to content

Better hooks for functional events #1808

@annevk

Description

@annevk

Most specifications that define functional events don't seem to fire them with the arguments Service Workers prescribes. In particular postDispatchSteps is often rather hand-wavy.

And given that some of the arguments are optional, but none are named (see Infra), it's rather unclear how to properly do this.

On top of that specifications might want to do something only after the events extension period is over, and perhaps do different things depending on whether the promise resolves or rejects. Doing this cleanly is somewhat murky at the moment. In Push API for instance we simply wait for some state to flip while in parallel: https://w3c.github.io/push-api/#dfn-fire-a-push-event

This should be organized a bit better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions