Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 8, 2016 01:56 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks