Skip to main content

EventInstance

view on npm

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

.id

The internal id of the event

.name

The name of the state (NOTE: set with the .name(name) function)

.name

Set the key of the state for enhanced internal tracking

.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