mdn/content
View on GitHubtimeRemaining() documentation should flag that it doesn't just count down
Open
#37,250 opened on Dec 17, 2024
Content:WebAPIhelp wanted
Description
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
- Folder:
en-us/web/api/idledeadline/timeremaining - MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline/timeRemaining
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/idledeadline/timeremaining/index.md
- Last commit: https://github.com/mdn/content/commit/ce85e3fb7865330e4ac2a6dad25db5cf5d27ea74
- Document last modified: 2024-03-11T23:58:17.000Z