1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 03:58:12 +00:00
serenity/Userland/Libraries/LibWeb/DOM/AbortSignal.idl
Tim Ledbetter ae42c6ed80 LibWeb: Implement AbortSignal.timeout()
This method returns a signal that will automatically abort after a
given number of milliseconds.
2024-02-28 07:42:43 -05:00

16 lines
603 B
Text

#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>
// https://dom.spec.whatwg.org/#interface-AbortSignal
[Exposed=(Window,Worker), CustomVisit]
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);
readonly attribute boolean aborted;
readonly attribute any reason;
undefined throwIfAborted();
attribute EventHandler onabort;
};