Intersection observer concepts and usage
The Intersection Observer API allows you to configure a callback that is called when either of these circumstances occur:
A target element intersects either the device's viewport or a specified element. That specified element is called the root element or root for the purposes of the Intersection Observer API.
The first time the observer is initially asked to watch a target element.
Typically, you'll want to watch for intersection changes with regard to the element's closest scrollable ancestor, or, if the element isn't a descendant of a scrollable element, the viewport. To watch for intersection relative to the root element, specify null.


Answers ( 2 )
what do you mean?
This is a great question. Have you tried googling some of the other options out there?