Template Engine

Class EventDispatcher

Requires:
Class
Event
Defined in:
EventDispatcher.js

EventDispatcher provides listening and dispatching events functionality

Constructor

EventDispatcher()
EventDispatcher

Methods

Method
addEventListener(type, callbackFunction, context)
Adding listener
Dispatches event
Checks if given event type listener is registered
Remove group of listeners or all listeners
removeEventListener(type, callbackFunction)
Remove listener
Class Detail
EventDispatcher()
Method Details
addEventListener(type, callbackFunction, context)
Adding listener
Parameters (optional)
type {String} Event type
callbackFunction {Function} Function that will be called if event of givent type will ocurr.
context
dispatchEvent(e)
Dispatches event
Parameters (optional)
e {Event} Event object to be dispatched
hasEventListener(type) :{Boolean}
Checks if given event type listener is registered
Parameters (optional)
type {String} Event type
Returns:
{Boolean} True if listener of given type is registered
removeAllEventListeners(type)
Remove group of listeners or all listeners
Parameters (optional)
type {String} Event type if given removes all listeners of given type, otherwise removes all listeners.
removeEventListener(type, callbackFunction)
Remove listener
Parameters (optional)
type {String} Event type
callbackFunction {Function} Function that was given on adding event listener.
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 17 2011 15:33:33 GMT+0200 (CEST)