Padloc Logo Docs & Resources

Class: EventEmitter

event-target.EventEmitter

Hierarchy

Implements

Constructors

constructor

new EventEmitter()

Properties

_listeners

Private _listeners: Map<string, Set<Listener>>

Defined in

core/src/event-target.ts:14

Methods

addEventListener

addEventListener(eventName, listener): void

Parameters

Name Type
eventName string
listener Listener

Returns

void

Implementation of

EventTarget.addEventListener

Defined in

core/src/event-target.ts:16


dispatch

dispatch(type, detail?): void

Parameters

Name Type
type string
detail? any

Returns

void

Defined in

core/src/event-target.ts:43


dispatchEvent

dispatchEvent(e): void

Parameters

Name Type
e Event

Returns

void

Defined in

core/src/event-target.ts:30


removeEventListener

removeEventListener(eventName, listener): void

Parameters

Name Type
eventName string
listener Listener

Returns

void

Implementation of

EventTarget.removeEventListener

Defined in

core/src/event-target.ts:23