blob: 37d267b662fd0946e6b5b59ea3b919328b42e300 [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,
RuntimeEnabled=AbortSignalTimeout
] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
[
CallWith=ScriptState,
NewObject,
RuntimeEnabled=AbortSignalAny
] static AbortSignal _any(sequence<AbortSignal> signals);
readonly attribute boolean aborted;
[CallWith=ScriptState] readonly attribute any reason;
[CallWith=ScriptState, MeasureAs=AbortSignalThrowIfAborted, RaisesException, RuntimeEnabled=AbortSignalThrowIfAborted] void throwIfAborted();
attribute EventHandler onabort;
};