ryuu.js
Version:
Ryuu JavaScript Utility Library
26 lines (25 loc) • 1.07 kB
TypeScript
/**
* Sends app data to the parent window.
*
* @this {Domo} - The Domo instance context.
* @param appData - The app data to send, as a string.
* @param onAck - Optional callback to invoke when the message is acknowledged.
* @param onReply - Optional callback to invoke when a reply is received.
*/
export declare function requestAppDataUpdate(appData: string, onAck?: Function, onReply?: Function): void;
/**
* Registers a callback to be invoked when app data is received.
* NOTE: this references the Domo object, so it should be called in the context of Domo.
*
* @param callback - The function to call when app data is received.
* @returns A function to unregister the callback.
*/
export declare function onAppDataUpdated(callback: Function): () => void;
/**
* Handles incoming app data messages and invokes registered callbacks.
*
* @param message - The message containing app data.
* @param responsePort - The port to send the response back.
* @returns void
*/
export declare function handleAppData(message: any, responsePort: MessagePort): void;