Category: IntersectionObserver

IntersectionObserver comes to Firefox

A great intro by Dan Callahan on why IntersectionObserver is so damn useful: What do infinite scrolling, lazy loading, and online advertisements all have in common? They need to know about—and react to—the visibility of elements on a page! Unfortunately, knowing whether or not an element is visible has traditional...

Native Infinite Scrolling with the IntersectionObserver API

Recently an interesting new client-side JavaScript API appeared on the Web Platform, the IntersectionObserver API. This tiny but useful API provides a means to efficiently monitor (observe) the visibility of specified DOM elements, that is, when they are in or out of a viewport (the viewport of the browser window or of...