An update will now only be queued through requestAnimationFrame whenever
changes occurred. This means that absolutely no code is running when the
page is idling (helpful for power saving and scalability). Care was
taken to first read from the DOM and afterwards update it in the new
scroll handler to prevent any possible layout thrashing as described here:
An update will now only be queued through requestAnimationFrame whenever changes occurred. This means that absolutely no code is running when the page is idling (helpful for power saving and scalability). Care was taken to first read from the DOM and afterwards update it in the new scroll handler to prevent any possible layout thrashing as described here:
http://wilsonpage.co.uk/preventing-layout-thrashing/
lastWidth, lastHeight and all sensor properties are only updated once every frame.