XIntersectionObserver is an extension of IntersectionObserver with added capabilities:

  • can skip the initial callback that happens shortly after setting up via observeLater

Constructors

Properties

disconnect: () => void
observe: (...targets: Element[]) => void

Like IntersectionObserver:observe except it accepts multiple targets.

observeLater: (...targets: Element[]) => void

Like observe but it ignores the initial almost immediate callback and only calls the callback on a subsequent intersection change.

root: null | Element | Document
rootMargin: string
takeRecords: () => void

Like IntersectionObserver.takeRecords.

thresholds: number[]
unobserve: (...targets: Element[]) => void

Like IntersectionObserver:unobserve except it accepts multiple targets.