IntersectionObserver class
The interface of the Intersection Observer API 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. The ancestor element or viewport is referred to as the root. When an is created, it's configured to watch for given ratios of visibility within the root. The configuration cannot be changed once the is created, so a given observer object is only useful for watching for specific changes in degree of visibility; however, you can watch multiple target elements with the same observer.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- IntersectionObserver(IntersectionObserverCallback callback, [IntersectionObserverInit? options])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- root → dynamic
-
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
no setter - rootMargin → String
-
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
thresholds
→ Iterable<
double> -
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
no setter
Methods
-
disconnect(
) → void -
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observe(
Element target) → void -
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
-
takeRecords(
) → Iterable< IntersectionObserverEntry> -
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
-
toString(
) → String -
A string representation of this object.
inherited
-
unobserve(
Element target) → void -
Available on IntersectionObserver, provided by the PropsIntersectionObserver extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited