Skip to content

Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 03

The HTML event loop

The browser's event loop beyond tasks and microtasks: where rendering happens, animation frames, timer accuracy, task priorities and idle callbacks. The language-level loop is in JavaScript's async chapter.
  1. 010Where does rendering happen in the event loop?Corehard
  2. 020How does requestAnimationFrame work, and when do its callbacks run?medium
  3. 030Why doesn't setTimeout(fn, 0) run after 0 ms?medium
  4. 040How do you schedule work by priority with scheduler.postTask() and scheduler.yield()?hard
  5. 050What does requestIdleCallback guarantee, and when does it never run?medium