Class: EventEmitter
event-target.EventEmitter
Hierarchy
-
EventEmitter
Implements
Constructors
constructor
• new EventEmitter()
Properties
_listeners
• Private
_listeners: Map
<string
,
Set
<Listener
>>
Defined in
Methods
addEventListener
▸ addEventListener(eventName
, listener
): void
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
void
Implementation of
Defined in
dispatch
▸ dispatch(type
, detail?
): void
Parameters
Name | Type |
---|---|
type |
string |
detail? |
any |
Returns
void
Defined in
dispatchEvent
▸ dispatchEvent(e
): void
Parameters
Name | Type |
---|---|
e |
Event |
Returns
void
Defined in
removeEventListener
▸ removeEventListener(eventName
, listener
): void
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
void
Implementation of
EventTarget.removeEventListener