liveBook · Manning

Event capturing

Event capturing is the phase of DOM event propagation in which an event travels from outer ancestors toward its target.

How 3 Manning books explain it

Secrets of the JavaScript Ninja, Second Edition

The phase of DOM event dispatch in which an event travels down the hierarchy toward its target.

How it is used
Uses capturing to control handler order when a DOM event propagates through nested elements.
How deep it goes
Explains both propagation phases and the addEventListener Boolean setting through nested click handlers, without descending into browser internals.
Examples
Compares click handlers on nested elements and document, including listeners registered for different propagation phases.
What you can do after
Operate/configure it with addEventListener’s third Boolean argument to select capturing instead of default bubbling.

Read how Secrets of the JavaScript Ninja, Second Edition explains event capturing →

Vanilla Web

The event-propagation stage in which an event travels down the DOM tree toward its target.

How it is used
Positions listeners on the downward path of a DOM event before it reaches its target.
How deep it goes
Traces capture, target, and bubble order with registered listeners, including their order at the target.
Examples
Logs a paragraph click across document, body, header, and paragraph listeners in both phases.
What you can do after
Apply it via addEventListener() with `{ capture: true }` to run a listener on the downward event path.

Read how Vanilla Web explains event capturing →

React Quickly, Second Edition

The capture phase is the stage in event propagation during which an event travels from an outer target toward its originating target.

How it is used
Coordinates event handling when an application must observe interactions while they travel toward their originating elements.
How deep it goes
Defines propagation order and capture-listener registration, then defers React-specific differences to later treatment.
Examples
Uses a clicked button, ancestor traversal, addEventListener, capture: true, and eventPhase as concrete teaching artifacts.
What you can do after
Apply it via JavaScript addEventListener by registering callbacks specifically for the capture phase.

Read how React Quickly, Second Edition explains event capturing →

What to know first

Related concepts

Questions about event capturing

What is event capturing?

Event capturing is the phase of DOM event propagation in which an event travels from outer ancestors toward its target.

Which Manning books explain event capturing?

Secrets of the JavaScript Ninja, Second Edition, Vanilla Web and React Quickly, Second Edition.

What should I know before learning event capturing?

Manning books that teach event capturing usually introduce Document Object Model first.

What is the difference between event capturing and event bubbling?

Event capturing is the phase of DOM event propagation in which an event travels from outer ancestors toward its target. Event bubbling is DOM event propagation in which an event travels from its target through successive ancestor nodes.

What is event capturing part of?

Event capturing is part of event propagation. Event propagation is the process by which an event travels through a hierarchy of elements during capture, target, and bubbling phases.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.