The Intersection Observer API can be used to asynchronously observe changes in the intersection of a target Element with an ancestor element (for infinite scrolling lists) or the top-level document's viewport (for 'viewability' tracking).
Docs: https://github.com/WICG/IntersectionObserver/blob/gh-pages/explainer.md https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API