Level 3 · Interactive Web Applications
Module 12: Events and Interaction
Event listeners
Attach event listeners with addEventListener, respond to clicks and key presses, and remove listeners you no longer need.
Lesson 57
Event objects
Read the event object (type, target, currentTarget, key, modifier keys) and stop default browser behaviour with preventDefault.
Lesson 58
Event bubbling and capturing
Trace how an event travels through capture, target and bubble phases, and control it with stopPropagation and the capture option.
Lesson 59
Event delegation
Handle events for many (and future) child elements with one listener on a parent, using event.target.closest and data attributes.
Lesson 60
Building interactive components
Build small interactive components that keep their state in variables, update the DOM from that state, and expose correct ARIA attributes.
Module mastery assessment
Eight questions and a browser practical covering Lessons 56 to 60: event listeners, event objects, bubbling and capturing, delegation and interactive components.