JavaScript Complete Reference Index

Select any item below to open its full syntax specification, parameters, and live example.

JavaScript Tutorial

Regular expression syntax

1 entry

Web APIs

15 entries
AbortControllernew AbortController()
Creates a controller and its associated AbortSignal. Calling abort signals cooperative cancellation to interested operations. It does not forcibly terminate arbitrary code.
AbortController.abort()controller.abort([reason])
Signal cancellation to consumers that observe this controller. The optional reason is stored on the signal; cancellation does not forcibly stop arbitrary code. Example console output: true superseded.
AbortController.prototype.abort()controller.abort(reason)
Marks the associated signal aborted once and notifies listeners. Subsequent calls leave the existing abort reason unchanged.
AbortSignalcontroller.signal
Object conveying cancellation state and reason, with an abort event. Signals can be shared with operations that accept them. An aborted signal does not reset.
AbortSignal.abort()AbortSignal.abort(reason?)
Creates an already-aborted signal without creating a controller.
AbortSignal.abort()AbortSignal.abort(reason)
Creates an already aborted signal with the supplied reason or the default abort reason.
AbortSignal.abortedsignal.aborted
Indicates whether the signal has entered its irreversible aborted state.
AbortSignal.any()AbortSignal.any(signals)
Creates a signal that aborts when one of the supplied signals aborts, using the selected source reason. It cannot reset once aborted.
AbortSignal.any()AbortSignal.any(signals)
Create a signal that aborts when any supplied signal aborts. The result carries the first observed abort reason. Example console output: true stop.
AbortSignal.prototype.abortedsignal.aborted
Read-only Boolean reflecting whether cancellation has been signaled.
AbortSignal.prototype.reasonsignal.reason
Read-only cancellation reason, undefined before abort. After abort it exposes the selected reason.
AbortSignal.prototype.throwIfAborted()signal.throwIfAborted()
Throws the stored reason if aborted, otherwise completes normally. Useful before work begins and at cooperative cancellation checkpoints.
AbortSignal.reasonsignal.reason
Provides the abort reason after cancellation; before cancellation it is undefined.
AbortSignal.throwIfAborted()signal.throwIfAborted()
Throw the stored reason if cancellation has been signaled. Otherwise return normally. Example console output: closed.
AbortSignal.timeout()AbortSignal.timeout(milliseconds)
Creates a signal that aborts with a timeout reason after a host-scheduled delay. Exact timing is not guaranteed; some runtimes do not keep an otherwise idle process alive for the signal.

Language concepts

1 entry

Operators

2 entries

Concepts

1 entry

Showing 20 of 1073 entries