Intersection Observer
The new Intersection Observer interface is here as a response of developers trying to figure out the best way to detect when an element enters the viewport. Doing this is useful in a lot of cases like infinite scrolling, lazy loading images or animating content.
Quick introduction to the Intersection Observer API on jeremias.codes