4 ms·
Why do you need to detect whether something is in the viewport?
by rjbwork 9y ago
Why do you need to detect whether something is in the viewport?
- eyelidlessness 9y agoThe linked description provides several use cases.
- SimeVidas 9y agoFor 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.
- esailija 9y agoYou can easily scroll so that the intersection observer sentinels are not seen and cause bugs. Disappointing.