Browser Events and Event Delegation Cheat Sheet
Handle browser events with predictable propagation, scalable delegation, cancellable defaults, abortable listeners, and shadow-DOM-aware event paths.
Open cheat sheetHTML · 9 guides
Work with document nodes, browser events, observers, navigation, and timing.
Focused references
Each guide includes copy-ready syntax, detailed examples, and authoritative references.
Handle browser events with predictable propagation, scalable delegation, cancellable defaults, abortable listeners, and shadow-DOM-aware event paths.
Open cheat sheetInitialize at the right readiness state, pause hidden-page work, restore from the back-forward cache, and send final state without blocking navigation.
Open cheat sheetCreate DOM ranges, inspect user selections, replace or clone selected content, measure fragments, and handle form controls and shadow roots correctly.
Open cheat sheetSelect, traverse, create, move, replace, clone, and remove DOM nodes with safe construction patterns and predictable collection behavior.
Open cheat sheetBuild reusable DOM fragments and web components with template, slot, custom elements, shadow roots, lifecycle callbacks, and safe cloning.
Open cheat sheetParse and validate URLs, edit query strings, manage fragments and session history, and progressively enhance navigation without breaking browser controls.
Open cheat sheetObserve DOM mutations, viewport intersections, and element size changes with precise delivery timing, bounded callbacks, and reliable lifecycle cleanup.
Open cheat sheetMeasure navigation, resources, user flows, rendering, and responsiveness with PerformanceObserver while controlling overhead and data exposure.
Open cheat sheetCreate, coordinate, inspect, and clean up script-driven animations with keyframes, timing controls, promises, accessibility, and compositing.
Open cheat sheet