diff --git a/5-network/04-fetch-abort/article.md b/5-network/04-fetch-abort/article.md index b612383d..6548f81d 100644 --- a/5-network/04-fetch-abort/article.md +++ b/5-network/04-fetch-abort/article.md @@ -9,7 +9,7 @@ The usage is very straightforward: ## The AbortController object -Step 1: create a controller: +Create a controller: ```js let controller = new AbortController(); @@ -145,4 +145,4 @@ let results = await Promise.all([...fetchJobs, ourJob]); - `AbortController` is a simple object that generates `abort` event on it's `signal` property when `abort()` method is called (and also sets `signal.aborted` to `true`). - `fetch` integrates with it: we pass `signal` property as the option, and then `fetch` listens to it, so it becomes possible to abort the `fetch`. -- We can use `AbortController` in our code. The "call `abort()`" -> "listen to `abort` event" interaction is simple and universal. We can use it even without `fetch`. \ No newline at end of file +- We can use `AbortController` in our code. The "call `abort()`" -> "listen to `abort` event" interaction is simple and universal. We can use it even without `fetch`.