Contact emailsshase...@chromium.org ExplainerDiscussion: https://github.com/whatwg/dom/issues/927 Examples/use cases: https://developer.mozilla.org/enUS/docs/Web/API/AbortSignal/throwIfAborted
Specificationhttps://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 componentBlink>DOM <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EDOM> Motivation AbortSignal-handling functions often need to check the signal's status and propagate the error if the signal has been aborted. AbortSignal.throwIfAborted provides a convenient and consistent way to do this. Initial public proposal TAG reviewN/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 statusNot applicable Risks Interoperability and Compatibility 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: No signals Other signals: Ergonomics No risk; 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 <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md> ?Yes. https://wpt.fyi/results/dom/abort/event.any.html?label=master&label=experimental&aligned&q=dom%2Fabort Flag name Requires code in //chrome?False Tracking bughttps://bugs.chromium.org/p/chromium/issues/detail?id=1273458 Launch bughttps://bugs.chromium.org/p/chromium/issues/detail?id=1290443 Estimated milestones No milestones specified Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5029737100476416 This intent message was generated by Chrome Platform Status <https://chromestatus.com/>. -- 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+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXGoJ3tUkTGZ1VBQm4139zL0n%3De-DO5emVpZE3ukya4Akyu2w%40mail.gmail.com.