Skip to content

available() and install() return both promises and throw exceptions #196

Description

@jan-ivar

The promise guide says: "promise-returning functions should never synchronously throw errors, since that would force duplicate error-handling logic on the consumer"

Both available() ("throw it and abort these steps") and install() ("throw an InvalidStateError and abort these steps.") appear to violate this.

This must be fixed — the behavior isn't even possible in implementations like Gecko which auto-reject the promise instead of throwing in the WebIDL binding code.

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