Intersection Observer API: Scroll, Lazy Load & Scrollspy
Most Intersection Observer tutorials give you a fade-in-on-scroll snippet and stop. This 2026 guide adds the CSS scroll-driven animations alternative (animation-timeline: view()), content-visibility composition, IntersectionObserver v2 for ad viewability, the sticky header sentinel pattern, React useInView and Vue useIntersectionObserver hooks, Next.js/Astro SSR guards, the jsdom polyfill, an Observer family comparison, takeRecords(), and Element.checkVisibility() — plus all four classic patterns and the threshold:1 trap.