IntersectionObserver

Provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element.

See also

Constructors

Link copied to clipboard
constructor(options: IntersectionObserver.Options? = null, resized: (List<IntersectionObserver.Entry>) -> Unit)

Types

Link copied to clipboard
class Entry(val target: Element, val boundingClientRect: DOMRectReadOnly, val intersectionRatio: Double, val intersectionRect: DOMRectReadOnly, val isIntersecting: Boolean, val rootBounds: DOMRectReadOnly)
Link copied to clipboard
class Options(val root: Element? = null, val rootMargin: String? = null, val thresholds: List<Double>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun observe(element: Element)
Link copied to clipboard
Link copied to clipboard
fun unobserve(element: Element)