Re:Passive event listeners
by rjbwork on Wednesday August 16, 2017 @04:37PM
(#15031170)
Why do you need to detect whether something is in the viewport?
[ Parent
| on HN ]
For lazyloading stuff like images and ads. Or that technique where you have an infinite list, and the elements that are scrolled off-screen are recycled on the other end.
You can easily scroll so that the intersection observer sentinels are not seen and cause bugs. Disappointing.
Re:Passive event listeners
by eyelidlessness on Wednesday August 16, 2017 @05:04PM
(#15031360)
The linked description provides several use cases.