The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or viewport.
Scroll down to see elements animate when they enter the viewport.
Images load when they enter the viewport.