01
The Document and Events
The API that reads and modifies the node tree, an event's capture-target-bubble journey, managing many elements with a single listener, and intervening in the browser's default behavior.
- 01 The DOM API The interface that reads and modifies the document tree; the node-versus-element distinction, the difference between a live collection and a static list, the attribute-property duality, and the cost of batch changes.
- 02 The Event Model The path an event follows from root to target and back from target to root; capture, target, and bubble phases, listener order, the two forms of stopping propagation, and listener identity.
- 03 Event Delegation Serving many elements' events with a single listener bound to an ancestor; telling the target apart from the current target, finding the closest matching ancestor, carrying identity in the markup, and delegation's limits.
- 04 Default Behavior and Cancellation The browser's built-in response to events and the request to cancel it; the cancelability condition, why cancellation is not the same as stopping propagation, the passive listener's constraint, and when cancellation is legitimate.
- 05 Focus and Keyboard Interaction Determining the single element that receives input; focusability conditions, computing tab order, the bubbling behavior of focus events, the information key events carry, and a navigation layout leaving a single stop within a group.
- 06 Form Events The flow from value change to submission; the distinction between input and change events, building the entry list, the submitter's contribution, the states of constraint validation, and accessible reporting of an error.