addEvent

Adds an event handling function to an HTML element.

Signatures

  • Paramate.Viewport.addEvent( elmt, eventName, eventHandler )

Details

The function allows to add event handlers to an HTML object like the addEventListener method. In addition, it stores the event in a central table what allows a simple removing using the ref_removeEventsfunction.

Parameters

elmt

HTML element the event is added to.

eventName

Name of the event type, e.g. "mousedown".

eventHandler

Function that will be called in case of an event.