Class GSDOMEventsMixin

A mixin class providing DOM event handling capabilities.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addEventListener(eventType, func, scope)
Registers the given function as a handler for DOM events of the specified type occurring on the component's target element.
 
Removes the event listener function represented by the token parameter from this feature
 
Removes all registered event listeners from the component's target element
Class Detail
GSDOMEventsMixin()
Method Detail
{Object} addEventListener(eventType, func, scope)
Registers the given function as a handler for DOM events of the specified type occurring on the component's target element. This function returns a token that can be passed to the #removeEventListener to remove the event listener. If the scope argument is not passed the function will execute in the context of this object
Parameters:
{String} eventType
the event type to add the listener for. Can be one of: click, mousedown, mouseup, mouseover, mouseout
{Function} func
The function to invoke when the event is triggered
{Object} scope Optional
the scope (this reference) in which the function is executed
Throws:
{Error}
if this component does not define a reference to its DOM element
Returns:
{Object} a token that can be passed to the GSEventManager#removeEventListener to remove the event listener.

removeEventListener(token)
Removes the event listener function represented by the token parameter from this feature
Parameters:
{Object} token
a token identifying the event handler to be removed

removeEventListeners()
Removes all registered event listeners from the component's target element

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:28 GMT+1300 (NZDT)