Skip to main content
Module

x/evt/mod.ts>dom.IntersectionObserver

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.IntersectionObserver
import { type dom } from "https://deno.land/x/evt@v2.4.13/mod.ts";
const { IntersectionObserver } = dom;

provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.

Properties

readonly
root: Element | null
readonly
rootMargin: string
readonly
thresholds: ReadonlyArray<number>

Methods

disconnect(): void
observe(target: Element): void
takeRecords(): IntersectionObserverEntry[]
unobserve(target: Element): void