Use IntersectionObserver for better future performance.
birkir opened this issue ยท 2 comments
birkir commented
IntersectionObserver is way faster than hooking into the scroll.
Then add the polyfill
terwanerik commented
Not hooking on to the onscroll event at all! Using requestAnimationFrame, way more preformant than the 100ms delay used in the IntersectionObserver polyfill you posted. IntersectionObserver is looking promising, but i will hold off on implementing untill it's supported on all mayor browsers.
Thanks for the heads up!
johanneslamers commented
Any updates on this? http://caniuse.com/#feat=intersectionobserver. 63% can use this.