The currentTarget event property is used for returning the element whose event listeners are responsible for triggering the event. The currentTarget event property is generally used during capturing and bubbling.
Below program illustrates the currentTarget event property :
Example: Getting the element whose event listeners triggered a specific event.
Before clicking the button:
After clicking the button:
- Internet Explorer
- Google Chrome
- Apple Safari