API Docs for: 0.6.1
Show:

EventTarget Class

Base class for objects that dispatches events.

Constructor

EventTarget

()

Methods

addEventListener

(
  • type
  • listener
)
EventTarget

Add an event listener

Parameters:

  • type String
  • listener Function

Returns:

EventTarget:

The self object, for chainability.

dispatchEvent

(
  • event
)
EventTarget

Emit an event.

Parameters:

  • event Object
    • type String

Returns:

EventTarget:

The self object, for chainability.

hasEventListener

(
  • type
  • listener
)
Boolean

Check if an event listener is added

Parameters:

  • type String
  • listener Function

Returns:

Boolean:

removeEventListener

(
  • type
  • listener
)
EventTarget

Remove an event listener

Parameters:

  • type String
  • listener Function

Returns:

EventTarget:

The self object, for chainability.