News for hackers. Stuff that matters.
Re:Show HN: In-view.js – Get notified when DOM elements ente... by JasonSage on Saturday August 27, 2016 @03:47PM (#12373863)
Whenever I rely on scroll information, I store the event info I need on the scroll event in some variable, and the logic that would normally be placed in the callback goes in a separate requestAnimationFrame loop. This way, even if it takes a few ms, it doesn't impact the scroll speed of the page. I wish more developers did this.
Re:Show HN: In-view.js – Get notified when DOM elements ente... by Senji on Tuesday August 30, 2016 @03:23PM (#12393091)
Ah the good old "GET OFF THE UI THREAD!"