JavaScript Data GridEventManager
Description
Event DOM manager for internal use in Handsontable.
Members
context
Source codeeventManager.context : object
Methods
addEventListener
Source codeeventManager.addEventListener(element, eventName, callback, [options]) ⇒ function
Register specified listener (eventName
) to the element.
Param | Type | Default | Description |
---|---|---|---|
element | Element | Target element. | |
eventName | string | Event name. | |
callback | function | Function which will be called after event occur. | |
[options] | AddEventListenerOptions boolean | false | optional Listener options if object or useCapture if boolean. |
Returns: function
- Returns function which you can easily call to remove that event.
clear
Source codeeventManager.clear()
Clear all previously registered events.
destroy
Source codeeventManager.destroy()
Destroy instance of EventManager, clearing all events of the context.
destroyWithOwnEventsOnly
Source codeeventManager.destroyWithOwnEventsOnly()
Destroy instance of EventManager, clearing only the own events.
fireEvent
Source codeeventManager.fireEvent(element, eventName)
Trigger event at the specified target element.
Param | Type | Description |
---|---|---|
element | Element | Target element. |
eventName | string | Event name. |
removeEventListener
Source codeeventManager.removeEventListener(element, eventName, callback, [onlyOwnEvents])
Remove the event listener previously registered.
Param | Type | Default | 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. | |
[onlyOwnEvents] | boolean | false | optional Whether whould remove only events registered using this instance of EventManager. |