blob: 1ca9a20b6b2c48d77e7454559be9dfcab36ae436 [file] [log] [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://dom.spec.whatwg.org/#interface-AbortSignal
[
Exposed=(Window,Worker),
ActiveScriptWrappable
] interface AbortSignal : EventTarget {
[
CallWith=ScriptState,
Measure,
NewObject
] static AbortSignal abort(optional any reason);
[
CallWith=ScriptState,
MeasureAs=AbortSignalTimeout,
NewObject
] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
[
CallWith=ScriptState,
MeasureAs=AbortSignalAny,
NewObject,
RuntimeEnabled=AbortSignalAny
] static AbortSignal _any(sequence<AbortSignal> signals);
readonly attribute boolean aborted;
[CallWith=ScriptState] readonly attribute any reason;
[CallWith=ScriptState, MeasureAs=AbortSignalThrowIfAborted, RaisesException] void throwIfAborted();
attribute EventHandler onabort;
};