Skip to content

Latest commit

 

History

History

event-emitter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

EventEmitter

Abstract class for event listeners and triggers.

Allow for all components to listen and fire events.

Examples

const eventName = "eventName";
component.on(eventName, (event) => {
    console.log("Event fired");
});

// ...

const event = new BaseEvent(eventName, component);
component.fire(event);