Responsible JavaScript

Responsible JavaScript

Jeremy Wagner

if you can think of any situation where you’d want to monitor an element’s visibility, and then perform some work when its visibility changes, Intersection Observer is the right tool for the job, and it does that job fast. Intersection Observer isn’t the only observer in town. We also have Mutation Observer to detect if changes have occurred in the DOM, Resize Observer to detect if the size of an element has changed, and Performance Observer to detect if new entries have been added to performance APIs such as Navigation or Resource Timing.
2982-2986