Adds an event listener for the abort event.
Function to call when the signal is aborted
Optional
options: { once?: boolean }Listener options (currently only supports 'once')
Static
abortCreates an AbortSignal that is already aborted.
Optional
reason: anyThe abort reason (like "timeout" or "user cancelled")
A pre-aborted AbortSignal
Static
anyCombines multiple AbortSignals into one. If any of the input signals abort, the resulting signal will also abort.
Array of AbortSignals to combine
A new AbortSignal that aborts when any input signal aborts
Static
timeoutCreates an AbortSignal that automatically aborts after the specified delay. Perfect for implementing timeouts!
Time in milliseconds before the signal aborts
An AbortSignal that will abort after the delay
🚦 AbortSignal represents a signal object that allows you to communicate with a DOM request and abort it if required via an AbortController.
Think of it as a magical redstone signal that can stop things!
Example