1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:07:34 +00:00

LibWeb: Implement AbortSignal.any()

This method takes a list of AbortSignals and returns an AbortSignal
that is aborted when any of the input signals is aborted.
This commit is contained in:
Tim Ledbetter 2024-03-10 18:50:30 +00:00 committed by Andreas Kling
parent 9eaae99da7
commit 7625d8a155
5 changed files with 198 additions and 1 deletions

View file

@ -6,7 +6,8 @@
interface AbortSignal : EventTarget {
[NewObject] static AbortSignal abort(optional any reason);
[Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
// FIXME: [NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
// FIXME: Argument should be of type: sequence<AbortSignal>.
[NewObject] static AbortSignal _any(any signals);
readonly attribute boolean aborted;
readonly attribute any reason;