JavaScript Web APIs
Reference cards for browser-exposed JavaScript Web APIs, with engine-by-engine support summaries.
-
AbortController and AbortSignal
AbortController is the platform's standard cancellation primitive. AbortSignal flows through fetch, addEventListener, streams, and most async platform APIs added since 2019.
-
Fetch API: requests, responses, streaming, and abort
Fetch is the modern HTTP client built into the platform. It exposes Request, Response, AbortSignal, ReadableStream, and FormData as primitives that compose with the rest of the platform.
-
IntersectionObserver: visibility-driven loading
IntersectionObserver fires a callback when a target element enters or leaves a viewport-relative root, with configurable thresholds. The right primitive for lazy-load, infinite-scroll, and sticky-state detection.
-
Service workers: registration, lifecycle, fetch handling
A service worker is a programmable network proxy controlled by the page's origin. It enables offline, background sync, and push, but introduces a lifecycle that can outlive the page.
-
Web Components: custom-element lifecycle and slots
A custom element's lifecycle is defined by four user-agent callbacks plus three observable transitions. Knowing them is the difference between a robust component and one that leaks.