November 8, 2016 01:56 pm GMT
Original Link: https://hacks.mozilla.org/2016/11/cooperative-scheduling-with-requestidlecallback/
Cooperative Scheduling with `requestIdleCallback`
Potch:
If you absolutely must perform tasks on the main thread (mutating the DOM or interacting with main-thread-only Web APIs), you can now request the browser provide you with a window of time in which it is safe to do so!
... requestIdleCallback
allows the browser to wait until it identifies an idle period. An idle period may be a few milliseconds between painting individual frames.
This seems like the kind of thing that becomes a best practice. But how …
Cooperative Scheduling with `requestIdleCallback` is a post from CSS-Tricks
Original Link: https://hacks.mozilla.org/2016/11/cooperative-scheduling-with-requestidlecallback/
Share this article:
Tweet
View Full Article