Proposal: Add `AbortSignal.timeout()` shorthand to "Fetch: Abort" article
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- javascript
调研方向
打开 5-network/04-fetch-abort/article.md 并阅读手动超时示例,尤其是 try..catch 块。紧接着在其后添加提议的 AbortSignal.timeout() 小节,展示简写形式并解释 TimeoutError 与 AbortError 之间的区别。当文章清晰涵盖这两种超时方式时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- HTML
- 星标
- 25.5k
- 派生
- 4k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
javascript-tutorial/en.javascript.info 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1 小时以内 新手友好度 92/100
-
Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
javascript-tutorial/en.javascript.info#3978 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 74/100
查看 javascript-tutorial/en.javascript.info 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
agilepathway/label-checker#640 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
BasedHardware/omi#15662 · 1 条评论 ·
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
难度 2/5 1-3 小时 新手友好度 85/100
Kong/developer.konghq.com#7316 ·