EventControl
Use this control to manage the dispatching of and subscribing to events.
Constructing the event
const exampleEvent = new EventControl();
.subscribe()
Subscribe to an event
exampleEvent.subscribe((argumentOne, argumentTwo, argumentThree) => {
// This function is executed when the `notify` is called.
});
Adding more subscribers to the same EventControl will result in all subscribers being notified.
.notify()
Notifying the subscribers
exampleEvent.notify(argumentOne, argumentTwo, argumentThree);