AbortController
noun
say it: “uh-BORT kun-TROH-ler” /əˈbɔːrt kənˈtroʊlər/
A built-in JavaScript object that lets you cancel work that is still going, such as a fetch request nobody needs anymore.
What is AbortController in JavaScript?
AbortController — An object that sends cancellation signals to APIs such as fetch.
const controller = new AbortController();
const options = { signal: controller.signal };
In a sentence
- “Each new search makes an AbortController and cancels the request from the last one.”
- “I passed the AbortController's signal to fetch so the Cancel button could stop the download.”
Level: Freelancer · More JavaScript terms at this level
Updated