跳到主要内容

Function: pluginBootstrap()

pluginBootstrap(info, timeoutMs?): Promise<PluginBootstrapResult>

Defined in: packages/plugin-sdk/src/kernel/pluginBootstrap.ts:50

Wait for the host bootstrap. window.addEventListener('message', …) is used exactly once and removed immediately after the port arrives — a replayed or spoofed bootstrap is rejected by the nonce check on the host side, and nothing accepts SDK commands on the global listener afterwards.

Parameters

info

PluginBootstrapInfo

timeoutMs?

number = 5_000

Returns

Promise<PluginBootstrapResult>