Skip to main content

KPluginView

kds-plugin-document / Exports / KPluginView

Interface: KPluginView

KPluginView 用于支持multiView的插件,代表multiView中的每一个视图UI

The KPluginView class is used for plugin which has multiView and represent each view UI in multiView. You can post a message from the sandbox to the plugin view UI. You can access the KPluginView by calling the app.getPluginViewById() method.

Table of contents

Methods

Methods

postMessage

postMessage(data, origin?): void

从沙盒 JS 代码向插件多 UI 情况下的某个UI 窗口发送自定义消息

Post a message from the sandbox to the plugin view UI.

Parameters

NameTypeDescription
dataanyThe data posted from the sandbox.
origin?stringSpecifies what the origin of this window must be for the event to be dispatched, either as the literal string "*" (indicating no preference) or as a URI.

Returns

void

Defined in

api.d.ts:3744