Pixso Open Documentation
guide
  • 中文
  • English
guide
  • 中文
  • English
  • Plugin API

    • Brief Introduction
    • Prerequisites
    • manifest
    • Development Guide
    • Change Log
    • Plugin API Documentation

      • Overview
      • Global Object

        • pixso
        • pixso.ui
        • pixso.host
        • pixso.mouse
        • pixso.editor
        • pixso.keyboard
        • pixso.fieldset
        • pixso.viewport
        • pixso.vectorEditor
        • pixso.clientStorage
        • pixso.serverStorage
      • Node Types

        • BooleanOperationNode
        • ComponentNode
        • ComponentSetNode
        • DocumentNode
        • EllipseNode
        • FrameNode
        • GroupNode
        • InstanceNode
        • LineNode
        • PageNode
        • PolygonNode
        • RectangleNode
        • SectionNode
        • SliceNode
        • StarNode
        • TextNode
        • VectorNode
      • Data Types

        • Action
        • ArcData
        • BlendMode
        • CommandItem
        • ComponentProperties-Related
        • Constraints
        • DialogType
        • DocumentationLink
        • Effect
        • EmbedData
        • ExportSettings
        • FontName
        • Guide
        • HandleMirroring
        • HyperlinkTarget
        • Image
        • LayoutGrid
        • LetterSpacing
        • Library
        • LineHeight
        • NodeChangeProperty
        • OverflowDirection
        • Overlay
        • Paint
        • PublishStatus
        • Reaction
        • Rect-related
        • RGB & RGBA
        • StrokeCap
        • StrokeJoin
        • StyleChangeProperty
        • TextCase
        • TextDecoration
        • TextListOptions
        • ThemeType
        • ToolType
        • Transition
        • Trigger
        • Vector
    • Host API Documentation

      • Overview
      • Host API
  • Open API

    • OpenAPI Doc

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.

Prev
pixso.ui
Next
pixso.mouse