Skip to content

[worklets] addModule() should reject a promise with a more specific exception #509

@nhiroki

Description

@nhiroki

The current spec defines that addModule() rejects a promise with "AbortError" DOMException in any case:

  1. Reject promise with an "AbortError" DOMException.
    (see https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script)

This obfuscates the reason why addModule() failed and makes it hard to debug. It would be nice to reject it with a more specific exception like "NetworkError" and "SyntaxError".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions