Skip to content

Function: postMessage() ​

Call Signature ​

ts
function postMessage(name, message): void;

Defined in: types/desktop-engine.d.ts:5387

Sends a message to the app. Widgets and desktop pets placed on the desktop use 'host' to report the window position or to ask to be removed.

Parameters ​

ParameterType
name"host"
messageHostMessage

Returns ​

void

Call Signature ​

ts
function postMessage(name, message?): void;

Defined in: types/desktop-engine.d.ts:5389

Sends a message to the app (native side), received by the handler the app registered for name

Parameters ​

ParameterType
namestring
message?unknown

Returns ​

void

The SDK is released under the Apache License 2.0