mdn/content

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

已關閉

#37,250 建立於 2024年12月17日

 (3 則留言) (0 個反應) (0 位負責人)Markdown (23,216 個分叉)batch import
Content:WebAPIhelp wanted

倉庫指標

星標
 (10,944 顆星)
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

貢獻者指南