Constructor
new Events()
- Source
Example
class MyClass {
constructor() {
this.events = new Events( this );
}
start() {
this.emit( "start", { detail: { ... } } );
}
}
const myInstance = new MyClass();
myInstance.on( "start", e => { ... } );