From 8a330b3973a5c357d17de13224d7f47624736314 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Tue, 22 Sep 2020 15:03:47 -0300 Subject: [PATCH] One more step please --- 5-network/04-fetch-abort/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`.