Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit AbortSignal.timeout to Window and Worker #1055

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

shaseley
Copy link
Contributor

@shaseley shaseley commented Feb 4, 2022

Worklets are designed with minimal event loops such that they need only run a single task and corresponding microtasks, making APIs that schedule additional tasks unsuitable for worklets. This restricts the availability of AbortSignal.timeout to Window and Worker since the API schedules a task to implement the timeout.

Closes #1054.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chrome: …
    • Firefox: …
    • Safari: …
    • Deno (only for aborting and events): …
    • Node.js (only for aborting and events): …

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Worklets are designed with minimal event loops such that they need only
run a single task and corresponding microtasks, making APIs that
schedule additional tasks unsuitable for worklets. As such, we restrict
the availability of AbortSignal.timeout to Window and Worker since the
API schedules a task to implement the timeout.

Closes whatwg#1054.
@annevk annevk added the topic: aborting AbortController and AbortSignal label Feb 6, 2022
@annevk
Copy link
Member

annevk commented Feb 6, 2022

cc @Ms2ger

@Ms2ger
Copy link
Member

Ms2ger commented Feb 7, 2022

Makes sense, thanks. CC @leobalter

@annevk annevk merged commit dbb7916 into whatwg:main Feb 8, 2022
@annevk
Copy link
Member

annevk commented Feb 8, 2022

I decided to forego the usual requirements as all of this is new territory that's about to be implemented. (And the status quo was Window/Worker.)

@shaseley shaseley deleted the abort-signal-timeout-exposure branch April 29, 2022 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: aborting AbortController and AbortSignal
Development

Successfully merging this pull request may close these issues.

Should AbortSignal.timeout only be exposed on (Window, Worker)?
3 participants