pixso.host
The pixso.host object provides APIs for plugin host related properties.
clientWidth
- Readonly:
true - Type:
number - Tip:
Cross-thread Communication
Gets the width of the plugin host's visual window.
clientHeight
- Readonly:
true - Type:
number - Tip:
Cross-thread Communication
Gets the height of the plugin host's visual window.
platform
- Readonly:
true - Type:
PlatformType - Tip:
Cross-thread Communication
type PlatformType = "MAC" | "WINDOWS" | "UNKNOWN";
Returns the operating system type of the host.
HWDC
urlSearchParams
- type:
Record<string, string> - Tip:
Cross-thread Communication
Get the search parameter key-value pairs of the host url.
postMessage
- type:
postMessage: (message: any) => void - Tip:
Cross-thread Communication
Messages are sent from sandbox.js to host.js.
onmessage
- type:
Function | undefined
Listen for messages sent by host.js to sandbox.js.
on
- type:
on: (event: 'message', cb: (event: any) => void) => void
Listen for messages sent by host.js to sandbox.js.
once
- type:
once: (event: 'message', cb: (event: any) => void) => void
Listen for messages sent by host.js to sandbox.js, and remove the listener after the callback function runs once.
off
- type:
off: (event: 'message', cb: (event: any) => void) => void
Remove event handlers bound via pixso.host.on or pixso.host.once.