3 ms·
Not exactly poll. Use scroll events to start your polling; after the second time your loop function doesn't find a change in the scrollTop, stop requesting fram
by yuchi 13y ago
Not exactly poll. Use scroll events to start your polling; after the second time your loop function doesn't find a change in the scrollTop, stop requesting frames.
Even without this guard, with just the `old !== getScrollTop()` it doesn't eat so much CPU neither.