Class blade.xbrowser.EventHandler
Object
|
+--blade.xbrowser.EventHandler
- class
blade.xbrowser.EventHandler
A cross-browser compatibility layer for DOM event handling. Event handlers can be registered and removed for
parcticular objects and events, and are passed CrossBrowserEvent objects.
Defined in compatibility.js
See:
Method Summary |
function
|
addListenerFunction(element, eventtype, listener, captures)
Registers an eventhandler.
|
function
|
addListenerObject(element, eventtype, listener_object, listener_function, captures)
Registers an event handling object
|
function
|
removeListener(index)
Removes an event handler
|
blade.xbrowser.EventHandler
function blade.xbrowser.EventHandler()
addListenerFunction
function addListenerFunction(element, eventtype, listener, captures)
Registers an eventhandler.
Parameters:
element
- element the handler is bound to
eventtype
- type of event to be caught (in W3C format)
listener
- the handler code
captures
- optional flag to stop the event's propagation
Returns:
an index number used to unregister the handler
addListenerObject
function addListenerObject(element, eventtype, listener_object, listener_function, captures)
Registers an event handling object
Parameters:
element
- element the handler is bound to
eventtype
- type of event to be caught (in W3C format)
listener_object
- object the event handler is a function of
listener_function
- name of the object's event handler function
Returns:
an index number used to unregister the handler
removeListener
function removeListener(index)
Parameters:
index
- index of event handler to unregister