event.currentTarget
The event property holding the element whose listener is running right now, which changes as the event moves along its path.
In more detail
It is null once the event has finished dispatching, so read it inside the handler. In a delegated handler on a list, currentTarget is the list and target is whatever was clicked inside it.
Related terms
- event.target — The event property holding the element where the event actually started, such as the icon inside a button that was clicked.
- event propagation — The journey of an event through the DOM: down from the window to the target (capturing), at the target, then back up (bubbling).
Taught in
- Event Phases: Capturing, Target And Bubbling Demystified — Frontend Architecture & Web Platform