Q
What is 'event delegation'?
-
A
Removing all listeners
-
B
Assigning events to another developer
-
C
Attaching one listener to a parent element and handling events from its children through bubbling, using event.target
-
D
Firing events on a timer
Correct Answer:
C. Attaching one listener to a parent element and handling events from its children through bubbling, using event.target
Explanation:
Delegation also works for child elements added after the listener was attached.