JavaScripture
Contribute via GitHub Feedback

EventListener : Object

EventListener is an object that handles an event. It can be passed to addEventListener() instead of passing a Function. Any JavaScript object with a handleEvent method can be used as an EventListener.

Instance Methods

handleEvent(event : Event) : undefined

The method called when the event is raised.

Example:

Run

Results: