Class: EventHandler

core. EventHandler


new EventHandler()

The EventHandler class is used to handle events in the DocumentViewer control.

Methods


addEvent(eventName, listener [, options])

Parameters:
Name Type Argument Description
eventName string

The name of the event to listen for.

listener function

The function to call when the event is dispatched.

options object <optional>

The options for the event listener.

Properties
Name Type Description
once boolean

Whether the listener should only be called once.


dispatch(eventName, data)

Parameters:
Name Type Description
eventName string

The name of the event to dispatch.

data *

The data to pass to the event listeners.


removeEvent(eventName, listener)

Parameters:
Name Type Description
eventName string

The name of the event to remove listening for.

listener function

The function to remove from the event listeners.