6
公开标注数
6
参与人数
2026-07-18 09:18:20
首次 Whisper

本页的公开 Whisper

划选高亮2026-07-18 15:42:20
原文高亮摘录
Promise.race takes the first settled Promise.
Whisper 随想笔记
That's the whole point, but people always confuse it with the first resolved one.
划选高亮2026-07-18 12:39:20
原文高亮摘录
An empty iterable causes the returned promise to be forever pending
Whisper 随想笔记
Makes sense, nothing to race means no winner, so it just waits.
划选高亮2026-07-18 12:30:20
原文高亮摘录
An empty iterable causes the returned promise to be forever pending
Whisper 随想笔记
So an empty array just hangs forever? That's a nasty gotcha.
划选高亮2026-07-18 09:36:20
原文高亮摘录
Promise.race is always asynchronous: it never settles synchronously, even when the iterable is empty.
Whisper 随想笔记
Makes sense though, keeps behavior consistent across all cases.
划选高亮2026-07-18 09:27:20
原文高亮摘录
Promise.race is always asynchronous: it never settles synchronously, even when the iterable is empty.
Whisper 随想笔记
Good to know, I always assumed empty meant instant reject.
划选高亮2026-07-18 09:18:20
原文高亮摘录
Promise.race is always asynchronous: it never settles synchronously, even when the iterable is empty.
Whisper 随想笔记
Wait, so even an empty array still waits a tick? That's wild.

分享本页 Whisper

分享到 X
短链接
https://domwhisper.com/s/2815785af580
嵌入代码
<iframe src="https://domwhisper.com/embed/2815785af580" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>

看看大家在 developer.mozilla.org 上讨论了什么

安装 DomWhisper,浏览网页时实时查看 whisper,也可以加入讨论。

获取插件