This commit is contained in:
Ilya Kantor 2019-04-17 10:18:06 +03:00
parent a9d21768d8
commit 30f1dc4e4e

View file

@ -13,9 +13,9 @@ The usage is pretty simple:
let controller = new AbortController(); let controller = new AbortController();
``` ```
The controller is an extremely simple object. It has a single method `abort()`, and a single property `signal`, that generates an event when `abort()` is called: A controller is an extremely simple object. It has a single method `abort()`, and a single property `signal`. When `abort()` is called, the `abort` event triggers on `controller.signal`:
We can even use it without `fetch` for our own purposes, like this: Like this:
```js run ```js run
let controller = new AbortController(); let controller = new AbortController();