EventTarget Class
Base class for objects that dispatches events.
Constructor
EventTarget
()
Item Index
Methods
addEventListener
(
EventTarget
-
type
-
listener
Add an event listener
Parameters:
-
type
String -
listener
Function
Returns:
EventTarget:
The self object, for chainability.
dispatchEvent
(
EventTarget
-
event
Emit an event.
Parameters:
-
event
Object-
type
String
-
Returns:
EventTarget:
The self object, for chainability.
hasEventListener
(
Boolean
-
type
-
listener
Check if an event listener is added
Parameters:
-
type
String -
listener
Function
Returns:
Boolean:
removeEventListener
(
EventTarget
-
type
-
listener
Remove an event listener
Parameters:
-
type
String -
listener
Function
Returns:
EventTarget:
The self object, for chainability.