Closed annevk closed 7 years ago
The didTimeout attribute on an IdleDeadline object must return true if the callback was invoked by the invoke idle callback timeout algorithm, and false otherwise. ... The invoke idle callbacks algorithm:
- Let deadlineArg be a new IdleDeadline. Set the time associated with deadlineArg to deadline and set the didTimeout attribute to false. ...
The invoke idle callback timeout algorithm:
- Let deadlineArg be a new IdleDeadline. Set the time associated with deadlineArg to now and set the didTimeout attribute to true.
What do we need to clarify here?
You don't want to define an attribute value in terms of whether a callback was invoked. The must requirement doesn't translate to straightforward code.
Would changing it work if we changed the phrasing of the initial sentence to be:
The didTimeout attribute on an IdleDeadline object MUST return true if the callback is being executed outside an idle period due to it having exceeded the timeout passed as an IdleRequestOptions parameter when the callback was registered, and false otherwise
No, you should just define it how it's implemented. IdleDeadline has an associated X, which is initially Y. didTimeout's getter must return X. The callback sets X to Z.
Got it, thanks. Should be addressed in #62. I added some of the text about being executed outside an idle period to clarify the reason for didTimeout after defining it - I can make this a non-normative note if you prefer.
Resolved via https://github.com/w3c/requestidlecallback/pull/62.
didTimeout is still defined in a weird way.