This window has two click event listeners: clickCapture and clickBubble. For clickCapture the third parameter of addEventListener was set to true so that listener fires during the capturing phase. For clickBubble the third parameter was set to false, so it fires during the bubbling phase.

Both listeners receive events for clicks anywhere in the window, but they only produce output for clicks on table cells (TD elements).

Button 1 (the table cell with a 1 in it) has an event handler that is set with traditional event handling rather than with addEventListener. Notice that the message from that event handler is displayed after the CAPTURED message and before the BUBBLING message.

JavaScript file: events.js

1 2 3