omphalos.raiseToBundle
function omphalos.event.raiseToBundle(event, bundle, data)This operates the same as omphalos.event.raise(), but allows you to direct
the message at a specific bundle rather than your own.
The message will be transmitted to all graphics, panels and
extensions in that bundle, except for the sender (if the sender
is a member of that bundle), and can be listened for via
omphalos.event.on().
// Listen for an event in the current bundleconst unlisten = omphalos.event.on('my-event', (payload) => { omphalos.log.info(`Got event with data: ${payload.some}`);});
// Listen for an event from a specific external bundleconst unlistenExt = omphalos.event.on('their-event', 'other-bundle', (payload) => { omphalos.log.info(`Got external event with data: ${payload.some}`);});
// Raise an event to peers in the current bundleomphalos.event.raise('my-event', { some: 'data' });
// Raise an event to peers in a specific external bundleomphalos.event.raiseToBundle('their-event', 'other-bundle', { some: 'data' });