DOM - Event Callback Function (Attach function to Event)
About
An event callback is a callback function that is executed when a event is fired.
The Event callback function can be added / defined through:
- the setting of an event handler on…. such as onclick
- the adding of an event listener function with the function addEventListener
and get:
- an event object as first parameter