Returns a new AbortSignal object that is automatically aborted after a given number of milliseconds. This method can be used by developers to easily implement timeouts for signal-accepting async APIs, e.g. fetch().
Note: the TAG review is still pending (we replied to their initial set of questions and are awaiting response). Since filing the issue, however, the DOM spec PR has been merged and Safari and Firefox have implemented the feature, meaning this should be exempt from TAG review.
TAG review statusPending
- https://twitter.com/simonplend/status/1494309000824954882Other signals
: This has also shipped in Node and Deno.
We think this API is useful on its own, but also think it will benefit from an API to combine AbortSignals, e.g. combining a timeout with user cancellation, which we're currently working on: https://github.com/shaseley/abort-signal-any/blob/main/README.md.
The feature has already been implemented in both Safari and Firefox, but it would benefit from a polyfill for use in older browser versions.
WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No, this change is strictly additive.
Basic tooling only, i.e. autocomplete support for the new AbortSignal method will be provided.Yes
Requires code in //chrome?False
Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?No.
Anticipated spec changes
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/5768400507764736
Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXGoJ21UGV-atHU38es8AtFC4tYX7PQrMCoq-zObxo36z4ELQ%40mail.gmail.com