new EventHandler()
The EventHandler class is used to handle events in the DocumentViewer control.
Methods
-
addEvent(eventName, listener [, options])
-
Parameters:
Name Type Argument Description eventNamestring The name of the event to listen for.
listenerfunction The function to call when the event is dispatched.
optionsobject <optional>
The options for the event listener.
Properties
Name Type Description onceboolean Whether the listener should only be called once.
-
dispatch(eventName, data)
-
Parameters:
Name Type Description eventNamestring The name of the event to dispatch.
data* The data to pass to the event listeners.
-
removeEvent(eventName, listener)
-
Parameters:
Name Type Description eventNamestring The name of the event to remove listening for.
listenerfunction The function to remove from the event listeners.