Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

AbortSignal.abort()

3 tags 1 category

The AbortSignal.abort() static method returns an AbortSignal that is already set as aborted (and which does not trigger an abort event).

This is shorthand for the following code:

This could, for example, be passed to a fetch method in order to run its abort logic (i.e., it may be that code is organized such that the abort logic should be run even if the intended fetch operation has not been started).

Note: The method is similar in purpose to Promise.reject.

Inputs: reason The reason why the operation was aborted, which can be any JavaScript value. If not specified, the reason is set to “AbortError” DOMException.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…