AbortSignal.any(signals) returns a signal that is aborted when any of the source signals are aborted. Developers can use this to combine independent abort sources, e.g. timeouts specified with AbortSignal.timeout() and signals associated with user input, and pass them to async APIs like fetch().
Some async operations may be aborted due to a variety of reasons, e.g. due to timeout or user cancellation. And while nothing prevents an AbortController's abort method from being invoked for multiple reasons, combining signals enables separate layers of control, where the scope of cancellation may vary. Since AbortSignal-accepting APIs only accept a single signal, combining signals currently needs to be done in userland using event listeners, but this is complicated by challenges around memory leaks. AbortSignal.any() makes it easy to combine signals, and by allowing the UA to maintain these relationships, the UA can free related resources when safe to do so.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
Basic support only.
No milestones specified