AbortController - Web APIs | MDN (original) (raw)
Constructor
Creates a new AbortController object instance.
Instance properties
AbortController.signal Read only
Returns an AbortSignal object instance, which can be used to communicate with, or to abort, an asynchronous operation.
Instance methods
Aborts an asynchronous operation before it has completed. This is able to abort fetch requests, consumption of any response bodies, and streams.
Examples
See the AbortSignal page for usage examples.
You can find a full working example on GitHub; you can also see it running live.
Specifications
| Specification |
|---|
| DOM # interface-abortcontroller |
Browser compatibility
See also
- Fetch API
- Abortable Fetch by Jake Archibald