mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
The signal taken from the requestinit is now passed into the request object with the relevant steps. I added all spec comments to this method, as I had trouble figuring out which steps I had to add. This required implementing the algorithm to create dependent signals, which is used in the `any()` method. So that's now implemented as well. All of that required the machinery to have dependent and source signals on an AbortSignal. It uses an IndexSet as the spec requires it to be an ordered set. Part of #34866 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
17 lines
727 B
Text
17 lines
727 B
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://dom.spec.whatwg.org/#abortsignal
|
|
|
|
[Exposed=*, Pref="dom_abort_controller_enabled"]
|
|
interface AbortSignal : EventTarget {
|
|
[NewObject] static AbortSignal abort(optional any reason);
|
|
// [Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
|
|
[NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
|
|
readonly attribute boolean aborted;
|
|
readonly attribute any reason;
|
|
undefined throwIfAborted();
|
|
|
|
attribute EventHandler onabort;
|
|
};
|