Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/index.ts>dom.IntersectionObserver

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.IntersectionObserver
import { type dom } from "https://deno.land/x/evt@v2.4.16/lib/types/index.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