Methods
fire(event) → {EventTarget}
Sends an event to all listeners
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object |
Event passed to the listeners Properties
|
has(type) → {boolean}
Test if there are any listeners bound to a certain event type
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Type of event to test for |
off(type, listener) → {EventTarget}
Removes a listener for a certain event type
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Type of event listener to remove |
listener |
function |
Listener to remove |
on(type, listener) → {EventTarget}
Registers a new listener for a certain event type
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Type of event listener to add |
listener |
function |
Listener to add |