← Your scroll listener fires on every pixel. `IntersectionObserver` fires when visibility actually changes.Quiz

IntersectionObserver: visibility without a scroll listener

IntersectionObserver reports visibility changes asynchronously instead of running on every scroll pixel. Know how threshold and rootMargin decide WHEN it fires, what an entry actually exposes, and how to stop watching once you're done.

questions6
pass mark70%
feedbackinstant

No account needed. Every answer is explained as you go, with a reference to the spec or MDN — pass and you can claim a certificate.