Skip to content

Events

Omphalos allows panels, graphics and extensions to communicate with each other via events. This is supported both for intra-bundle communications, as well as for communications between bundles as well, as desired.

Events are transmitted via websocket to the destination locations, which means that they can only be delivered to peers that are connected.

The API has an event object that supports the following generic operations :

All events are represented by a string name, and can carry an arbitrary payload of JSON-encodable data. The payload is delivered as-is as the argument to the callback of the event handler set by omphalos.event.on().

Events are delivered to everything within the targeted bundle, with the sole exception of the bundle member that raises the event.

In addition to generic events, there are also a number of system defined events that provide bundle members with information about the state of the system in general, such as knowing when they are connected or disconnected from the event system.

These take the form of specialized versions of the omphalos.event.on() handler which listen for specific events.

See the API documentation for full details on what is available; the most commonly used events are: