w3c / requestidlecallback

Cooperative Scheduling of Background Tasks
https://w3c.github.io/requestidlecallback/
Other
50 stars 19 forks source link

`isExceeded` specified backward? #6

Closed lawnsea closed 9 years ago

lawnsea commented 9 years ago

The spec says the following on L299-300:

When the isExceeded() method on an IdleDeadline object is invoked, it MUST return true if the deadline attribute is greater than or equal to the time as returned by performance.now() [[!hr-time-2]], and false otherwise.

If the value of the deadline timestamp is greater than that returned from performance.now(), doesn't that mean the deadline is in the future and thus has not been exceeded?

rmcilroy commented 9 years ago

Yes you are right - I seem to have a blind spot for getting comparisons in the correct order...

I created a pull request at https://github.com/w3c/requestidlecallback/pull/9 to fix this. @plehegar, look good to you?