@shakrmedia/editor-sdk EventEmitter > on

EventEmitter.on() method#

Add an event listener to the Event Emiiter

Signature:
on<K extends keyof T>(type: K, listener: (this: this, event: T[K]) => void): this;

Parameters#

ParameterTypeDescription
typeKtype of an event listener to add
listener(this: this, event: T[K]) => voidevent listener callback function
Returns:

this