3 ms·
Shouldn't most of those be using Intersection Observers these days? That should avoid most of the cases where someone unintentionally breaks the user experience
by acdha 8y ago
Shouldn't most of those be using Intersection Observers these days? That should avoid most of the cases where someone unintentionally breaks the user experience.
- antibland 8y agoYes, and another bonus is that Intersection Observer is asynchronous and eliminates the need to tack on an additional debounce function.
- kakarot 8y agoNot yet, but soon: https://caniuse.com/#feat=intersectionobserver https://caniuse.com/#feat=intersectionobserver
- acdha 8y agoGood point: I’ve been using it with polyfills which tends to hit the same point of not using an API which encourages accidental jank but it’s no substitute for native support.
- kakarot 8y agoI am looking forward to switching over. Currently, I try to pool callbacks onto the same onScroll event when I can but it's still janky.