Andrew's Digital Garden

Targets on JS events

An event has two fields that contain the 'target' - event.target, and event.currentTarget.

target = the element that triggered the event currentTarget = the element that is listening to that event

[[20210920150655-js-events]]

[[js]]

Targets on JS events