Class: EventManager

EventManager

Event DOM manager for internal use in Handsontable.

Methods

addEventListener(element, eventName, callback){function}

Register specified listener (eventName) to the element.

Parameters:
Name Type Description
element Element

Target element.

eventName String

Event name.

callback function

Function which will be called after event occur.

Returns: {function} Returns function which you can easily call to remove that event

clear()

Clear all previously registered events.

destroy()

Destroy instance of EventManager.

fireEvent(element, eventName)

Trigger event at the specified target element.

Parameters:
Name Type Description
element Element

Target element.

eventName String

Event name.

removeEventListener(element, eventName, callback)

Remove the event listener previously registered.

Parameters:
Name Type Description
element Element

Target element.

eventName String

Event name.

callback function

Function to remove from the event target. It must be the same as during registration listener.