メインコンテンツまでスキップ

sendMessageToBundle

sendMessageToBundle(messageName, bundleName, *data, *cb) → {Promise|undefined}

Sends a message to a specific bundle. Also available as a static method. See sendMessage for usage details.

Returns

Browser Only

This can only be used in code which runs in Dashboards and Graphics.

A Promise that is rejected if the first argument provided to the acknowledgement is an Error, otherwise it is resolved with the remaining arguments provided to the acknowledgement. But, if a callback was provided, this return value will be undefined, and there will be no Promise.

Parameters

NameTypeAttributesDescription
namestringThe name of the message.
bundleNamestringThe name of the target bundle.
datamixed<optional>The data to send.
cbfunction<optional>Browser only The error-first callback to handle the server's acknowledgement message, if any.