// 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)
] 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
] 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;
};