browser ⟩ event ⟩ .currentTarget
the element that registered/handled the event, exactly the same as this. unless:
this
the handler is an arrow function,
or its this is bound to something else,
then we can get the element from event.currentTargetarrow-up-right.
event.currentTarget
javascript.info ⟩ Introduction to browser eventsarrow-up-right
Eventarrow-up-right
event.currentTargetarrow-up-right
"this" in event handler
Last updated 3 years ago