Uses IntersectionObserver to observe changes to nodes passed to the signal.

Either a signal/observable/function that returns Elements or ElementRefs, or a value that is Elements or ElementRef. If the source is a value then the signal will be writable.

Options for the signal or the IntersectionObserver used to monitor changes.

const el = document.getElementById('el1');
const $obs = intersectionSignal(el);
effect(() => console.log($obs()[0]?.attributeName)); // will log when scrolled into view.
el.scrollIntoView();