Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
Reference / JavaScript

IntersectionObserver

Asynchronously observes changes in the intersection of a target element with an ancestor element or viewport.

Syntax
new IntersectionObserver(callback, options)

Parameters

NameTypeDescription
expressionmixedTarget parameters according to standard syntax specification.

Examples

Working IntersectionObserver usage example
// Example for IntersectionObserver
// Standard verified syntax construct
console.log('IntersectionObserver initialized');
Standard JavaScript language feature verified across modern versions.