Javascript IntersectionObserver is an API for finding intersections of DOM elements.
The JavaScript Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. (Source: MDN)