AbortSignal
Abort Signal
Abort signals are used to trigger an abort of an operation; from MDN:
The AbortSignal interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.
Note that AbortSignal is also an EventTarget; the event abort
will be emitted when the signal is aborted.
AbortSignal
on MDN AbortController
on MDN
See also
Companion AbortController
class
Inheritors
Types
Link copied to clipboard
Models the structure expected/provided for constructors of an AbortSignal.
Properties
Functions
Link copied to clipboard
abstract fun addEventListener(type: String, options: AddEventListenerOptions, listener: EventListener)
Link copied to clipboard
Dispatches the event to the list of handlers for Event.type.
Link copied to clipboard
abstract fun removeEventListener(type: String, listener: EventListener, options: RemoveEventListenerOptions)
Removes the listener
from the list of handlers for event type
.
Link copied to clipboard
Throws the AbortSignal's reason for aborting, if aborted; from MDN: