mdn/content

timeRemaining() documentation should flag that it doesn't just count down

已关闭

#37,250 创建于 2024年12月17日

 (3 条评论) (0 个反应) (0 位负责人)Markdown (23,202 个派生)batch import
Content:WebAPIhelp wanted

仓库指标

星标
 (10,935 个星标)
PR 合并指标
 (平均合并 7天 3小时) (30 天内合并 147 个 PR)

描述

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline/timeRemaining

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

The text implies that the "current idle period" is a fixed period, and the method just counts down to the end of it. But in fact, it uses an algorithm passed from https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model that can suddenly jump to zero. I don't think it can increase, but you might want to check with the spec authors to be sure of that.

What did you expect to see?

A description of what asynchronous changes to expect from the return value of this method.

Do you have any supporting links, references, or citations?

https://github.com/w3c/requestidlecallback/issues/104

Do you have anything more you want to share?

No response

MDN metadata

贡献者指南