pixso.host
The pixso.host
object provides APIs for plugin host related properties.
clientWidth
- Readonly:
true
- Type:
number
Gets the width of the plugin host's visual window.
clientHeight
- Readonly:
true
- Type:
number
Gets the height of the plugin host's visual window.
platform
- Readonly:
true
- Type:
PlatformType
type PlatformType = "MAC" | "WINDOWS" | "UNKNOWN";
Returns the operating system type of the host.
HWDC
postMessage
- type:
postMessage: (message: any) => void
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
.