This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
var isAborted = signal.aborted;
In the following snippet, we create a new
FetchController object, get its
signal, and then give the signal to the fetch request via the signal parameter of its
init object so the controller can control it. Later on we specify an event listener on the
FetchSignal so that if whether or not it has been aborted, an appropriate log is sent to the console.
var controller = new FetchController(); var signal = controller.signal; signal.aborted ? console.log('Fetch has been aborted') : console.log('Fetch not aborted');
Not part of a specification yet.
|Feature||Chrome||Edge||Firefox (Gecko)||Internet Explorer||Opera||Safari (WebKit)|
|Basic support|| |
|No support||No support||No support|| |
|Feature||Android||Android Webview||Edge||Firefox Mobile (Gecko)||IE Phone||Opera Mobile||Safari Mobile||Chrome for Android|
|Basic support||No support||No support||No support||No support||No support||No support||No support||No support|
 Hidden behind a preference in 55+ Nightly. In about:config, you need to create two new boolean prefs —
dom.fetchController.enabled — and set the values of both to
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.