Skip to main content

AbortSignal

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 Jump to heading

readonly
Jump to headingaborted: boolean

Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.

Jump to headingonabort: ((
ev: Event,
) => any) | null
Jump to headingaddEventListener<K extends keyof AbortSignalEventMap>(
type: K,
listener: () => any,
options?: boolean | AddEventListenerOptions,
): void
Jump to headingremoveEventListener<K extends keyof AbortSignalEventMap>(
type: K,
listener: () => any,
options?: boolean | EventListenerOptions,
): void

Throws this AbortSignal's abort reason, if its AbortController has signaled to abort; otherwise, does nothing.

Back to top