In the Loop
summary
Explains why browsers run tasks, rendering and microtasks in strict order and shows practical consequences: setTimeout ≈4.7ms is unreliable for animation (demo: setTimeout animation runs ~3.5× faster than RAF), double requestAnimationFrame is required to force a start-frame style read before transition, the microtask queue starvation (promises/mutation observers) can block rendering forever, compositor can keep transforms/opacity smooth, Chrome/Firefox/Safari differ, and use rel=noopener to avoid shared event-loop jank between tabs.
AI-written summary · about
