Skip to main content

EventInstance

view on npm

A Plexus Event. This is a trackable event that can be listened to and fired.

.once(callback)

Listen for an event only once

ParamDescription
callback

The function to call when the event is fired

.on(callback)

Listen for an event

ParamDescription
callback

The function to call when the event is fired

.emit(payload)

Broadcast an event to all listeners

ParamDescription
payload

The payload to send to all listeners

.disable(disable)

Turn the Event Manager off/on

ParamTypeDefaultDescription
disablebooleantrue

Should this event Engine be disabled