Intersection observer
what? The Intersection Observer API is a modern JavaScript web API. Observer lets you react when an element enters or leaves the viewport—efficiently and without performance pain. Problem it solves. Before Intersection Observer, detecting visibility usually meant: Listening to scroll events Manually calculating element positions Running that logic constantly while scrolling That approach: Hurts performance…