const observer = new IntersectionObserver(callback);
observer.observe(document.getElementById("elementToObserve"));
// …
observer.unobserve(document.getElementById("elementToObserve"));IntersectionObserver: unobserve() method / notebook
IntersectionObserver: unobserve() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.