-
Notifications
You must be signed in to change notification settings - Fork 1
Module: core::EventTarget
Jovan Gerodetti edited this page Apr 14, 2021
·
4 revisions
exported: default
kind: object
declaration: const
Type: object
kind: value
constructor() => {EventTarget}
kind: function
kind: function
Do not use the make constructors
| Name | Type | Description |
|---|---|---|
| args | ...* |
on(type, listener) => {undefined}
kind: function
registers a new listener for the given event
| Name | Type | Description |
|---|---|---|
| type | string | the type / name of event |
| listener | Function | callback to execute when the event fires |
emit(type, data) => {undefined}
kind: function
emmits a new event on this object
| Name | Type | Description |
|---|---|---|
| type | string | the type of event |
| data | * | data to send to the callbacks |
removeListener(type, listener) => {undefined}
kind: function
removes a previously attached listener function.
| Name | Type | Description |
|---|---|---|
| type | string | the listener type |
| listener | Function | the listener function to remove |