Class: EventRegistry

EventRegistry()

Contains event handler registrations for a script. Access the registry through the global `events` object.

Constructor

new EventRegistry()

Source:

Methods

on(eventSource, eventType, eventHandler)

Registers a handler to be run when a particular kind of event occurs. When Brigade receives a matching event, it will run the specified handler. Possible event sources depend on the gateways configured in your Brigade system, and possible event types depend on the gateway. See the Brigade and gateway documentation for details.
Parameters:
Name Type Description
eventSource The event source (gateway) to register the handler for
eventType The event type to register the handler for
eventHandler The handler to run when an event with the given source and type occurs
Source: