web-feature: Intersection observer
The IntersectionObserver API asynchronously observes changes in the intersection of a target element with an ancestor element or with a top-level document’s viewport.
The IntersectionObserver API asynchronously observes changes in the intersection of a target element with an ancestor element or with a top-level document’s viewport.