Intent to Ship: AbortSignal.prototype.throwIfAborted

133 views
Skip to first unread message

Scott Haseley

unread,
Feb 10, 2022, 5:54:30 PM2/10/22
to blink-dev

Contact emails

shas...@chromium.org

Explainer

Discussion: https://github.com/whatwg/dom/issues/927
Examples: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted

Specification

https://dom.spec.whatwg.org/#dom-abortsignal-throwifaborted

Summary

Throws an AbortSignal's reason if the signal is aborted. This convenience method can be used by signal-handling functions to check a signal's abort status and propagate the abort reason, e.g. after async operations that might change a signal's state.


Blink component

Blink>DOM

TAG review

N/A: the feature has been merged into the DOM standard and has been shipped in at least one other browser, in line with the criteria in https://groups.google.com/a/chromium.org/g/blink-dev/c/naqmDmy1iM8/m/lQAJ17CRAQAJ.

TAG review status

Not applicable

Risks


Interoperability and Compatibility

Low risk. This feature is already part of the DOM standard, has web platform tests, and is implemented by Safari and Firefox. We'll improve eventual interop by shipping this feature.


Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1745372)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=234127)

Web developers: Positive. Minor positive feedback (likes) from announcement tweets:
- Node: https://twitter.com/simonplend/status/1487053107720859648 and https://twitter.com/jasnell/status/1466093594129756166

Other signals:

Ergonomics

None; this feature is an ergonomic improvement for AbortSignal users.


Activation

The feature has already been implemented in both Safari and Firefox, but it would benefit from a polyfill for use in older browser versions.


Security

None.


Debuggability

Basic tooling only, i.e. autocomplete support for the new AbortSignal method will be provided.


Is this feature fully tested by web-platform-tests?

Yes (https://wpt.fyi/results/dom/abort/event.any.html?label=master&label=experimental&aligned&q=dom%2Fabort)

Flag name

--enable-blink-features=AbortSignalThrowIfAborted

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1273458

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1290443

Measurement

UseCounter: AbortSignalThrowIfAborted

Sample links

https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted#examples

Estimated milestones

DevTrial on desktop100
DevTrial on android100

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5029737100476416

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXGoJ3tUkTGZ1VBQm4139zL0n%3De-DO5emVpZE3ukya4Akyu2w%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Feb 11, 2022, 10:57:43 AM2/11/22
to blin...@chromium.org
LGTM1 - seems like a useful feature and good to see that Gecko and WebKit have already shipped.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXGoJ1w2WYK4X6fA7V4C0xNJBetNb%3D%2BCMywobhzzc9q9xSRxg%40mail.gmail.com.


Yoav Weiss

unread,
Feb 11, 2022, 11:28:11 AM2/11/22
to Mike Taylor, blink-dev
LGTM2 - thanks for helping us catching up!

Chris Harrelson

unread,
Feb 11, 2022, 11:43:47 AM2/11/22
to Yoav Weiss, Mike Taylor, blink-dev

Joe Medley

unread,
Feb 15, 2022, 11:45:55 AM2/15/22
to Scott Haseley, blink-dev
I'm confused about the timeline for this. Is this shipping in 100 or is it starting a dev trial in 100?

Joe 
Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.


--

Scott Haseley

unread,
Feb 15, 2022, 11:59:47 AM2/15/22
to Joe Medley, blink-dev
Hi Joe -- This is shipping in 100.

Joe Medley

unread,
Feb 15, 2022, 12:35:12 PM2/15/22
to Scott Haseley, blink-dev
Apologies. I keep using 'shipping' in a sloppy way. I should have asked, will this be available by default in 100? If so, that number needs to be the shipping milestone fields, not the dev trial milestone fields.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

Scott Haseley

unread,
Feb 15, 2022, 12:52:03 PM2/15/22
to Joe Medley, blink-dev
Sorry for the confusion! This is enabled by default in 100, which should be reflected in chromestatus now.

Joe Medley

unread,
Feb 16, 2022, 10:34:40 AM2/16/22
to Scott Haseley, blink-dev
Thank you.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

Reply all
Reply to author
Forward
0 new messages