interface AbortSignal
extends EventTarget
A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
Properties #
Methods #
#addEventListener<K extends keyof AbortSignalEventMap>(type: K,listener: (this: AbortSignal,ev: AbortSignalEventMap[K],) => any,options?: boolean | AddEventListenerOptions,): void #addEventListener(type: string,listener: EventListenerOrEventListenerObject,options?: boolean | AddEventListenerOptions,): void #removeEventListener<K extends keyof AbortSignalEventMap>(type: K,listener: (this: AbortSignal,ev: AbortSignalEventMap[K],) => any,options?: boolean | EventListenerOptions,): void #removeEventListener(): void #throwIfAborted(): void Throws this AbortSignal's abort reason, if its AbortController has signaled to abort; otherwise, does nothing.
variable AbortSignal
The constructor object for AbortSignal.
AbortSignal instances are obtained from an AbortController or via the
static abort, timeout, and any factory methods rather than constructed
directly, so calling the constructor throws.
Properties #
#prototype: AbortSignal readonly
Methods #
#abort(reason?: any): AbortSignal #any(signals: AbortSignal[]): AbortSignal #timeout(milliseconds: number): AbortSignal