Scroll the stage below and watch isIntersecting and intersectionRatio
update in the log — only when the target's visibility actually crosses a line you set, never on
every scroll frame. Drag threshold and root margin to change
exactly when that happens, or flip lazy-load mode to see the real one-shot pattern:
fade in once, then unobserve().
The fraction of the box that must be visible before the callback reports isIntersecting: true.
0 fires at the first visible pixel; 1 waits for the whole box.
Grows or shrinks the stage's own visible edge for intersection purposes. Positive fires before the box reaches the fold (preloading); negative delays it.
Every line here is one real IntersectionObserverEntry. Notice how few there are
compared to how many pixels you scrolled — the callback only runs when visibility actually
crosses your threshold, off the main scroll path.