view source

requestAnimationFrame() allows modern browsers to stop drawing graphics when a tab or window is not visible. Improving overall performance and batteries on mobile devices.

RequestAnimationFrame.js emulates the basic usage for old browsers.