Get the element whose event listeners triggered a specific event:
The currentTarget event property returns the element whose event listeners triggered the event.
This is particularly useful during capturing and bubbling.
The currentTarget property always refers to the element whose event listener triggered the event, opposed to the target property, which returns the element that triggered the event.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
currentTarget | Yes | 9.0 | Yes | Yes | Yes |
Return Value: | A reference to the object whose event listeners triggered the event |
---|---|
DOM Version: | DOM Level 2 Events |