Chapter 02
Events
How the DOM delivers events: the dispatch path and its phases, delegation, default actions, listener options, custom events, timing relative to microtasks, and choosing input events.- 010How does event dispatch work — capture, target, and bubble?Coremedium
- 020What is event delegation, and when does it break?Coremedium
- 030What's the difference between
preventDefault(),stopPropagation(), andstopImmediatePropagation()?easy - 040What do the
once,passive,capture, andsignallistener options do?medium - 050How do you create and dispatch custom events, and what does
isTrustedmean?medium - 060Is
dispatchEvent()synchronous, and why do microtasks run differently for a real click?hard - 070Which input events should you listen to — pointer, mouse, touch, keyboard, or
input?medium