Proposal: Add `AbortSignal.timeout()` shorthand to "Fetch: Abort" article
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- documentation
Research direction
Open 5-network/04-fetch-abort/article.md and read the manual timeout example, especially the try..catch block. Add the proposed AbortSignal.timeout() subsection immediately after it, showing the shorthand and explaining the TimeoutError versus AbortError distinction. Done means the article clearly covers both timeout approaches.
Written by the indexing model from the issue text.
Description
Description
The "Fetch: Abort" article excellently explains the mechanics of AbortController and demonstrates a manual timeout using
setTimeout(() => controller.abort(), 1000)
Since aborting fetches due to time constraints is a very common use case, it would be highly beneficial for learners to also see the modern AbortSignal.timeout() method.
Proposal
I propose adding a short subsection titled ### AbortSignal.timeout() immediately following the try..catch block of the manual timeout example. This section will demonstrate the shorthand syntax and note the important distinction that it throws a TimeoutError rather than an AbortError.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from javascript-tutorial/en.javascript.info
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
javascript-tutorial/en.javascript.info#3978 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
All issues in javascript-tutorial/en.javascript.info
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·