Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2016-0-4 21:22

Class enchant.EventTarget

A class for implementation of events similar to DOM Events. However, it does not include the concept of phases.

Class Summary
Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
addEventListener(type, listener)
Add a new event listener which will be executed when the event is dispatched.
 
Clear all defined event listeners of a given type.
 
Issue an event.
 
on(type, listener)
Synonym for addEventListener.
 
removeEventListener(type, listener)
Delete an event listener.

Class Detail

enchant.EventTarget()

Method Detail

  • addEventListener(type, listener)
    Add a new event listener which will be executed when the event is dispatched.
    Parameters:
    {String} type
    Type of the events.
    {Function(e:enchant.Event)} listener
    Event listener to be added.
  • clearEventListener(type)
    Clear all defined event listeners of a given type. If no type is given, all listeners will be removed.
    Parameters:
    {String} type
    Type of the events.
  • dispatchEvent(e)
    Issue an event.
    Parameters:
    {enchant.Event} e
    Event to be issued.
  • on(type, listener)
    Synonym for addEventListener.
    Parameters:
    {String} type
    Type of the events.
    {Function(e:enchant.Event)} listener
    Event listener to be added.
    See:
    enchant.EventTarget#addEventListener
  • removeEventListener(type, listener)
    Delete an event listener.
    Parameters:
    {String} type Optional
    Type of the events.
    {Function(e:enchant.Event)} listener
    Event listener to be deleted.