w3c / requestidlecallback

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

should requestIdleCallback return unsigned long? #17

Closed tetsuharuohzeki closed 9 years ago

tetsuharuohzeki commented 9 years ago

revision: 7a1bbbb6f4ebc2f891cd74023b28add9e2dd7c33

By this spec revision, idle callback identifier is only incremented and not be decremented at all, thus this value will not be a negative value. So I feel unsigned long in WebIDL is more suitable type for the return value of requestIdleCallback().

igrigorik commented 9 years ago

Seems reasonable. That said, with my 'spec hat' on I'd prefer that we stay consistent with requestAnimationFrame: https://html.spec.whatwg.org/#window. Would you be willing to start a conversation on whatwg first to see if that can be updated?

tetsuharuohzeki commented 9 years ago

Hmm, okay, I'll file a new proposal issue which is about requestAnimationFrame to whatwg/html.

tetsuharuohzeki commented 9 years ago

By https://github.com/whatwg/html/pull/97, requestAnimationFrame() returns unsigned long now in whatwg/html.

igrigorik commented 9 years ago

Awesome, thanks for the quick turnaround! @rmcilroy any objections?

rmcilroy commented 9 years ago

No objections :+1: