Function: hostBootstrap()
hostBootstrap(
postBootstrap,buildHostHandshake,options):Promise<{handshake:PluginHandshake;nonce:string;port:MessagePort; }>
Defined in: packages/plugin-sdk/src/kernel/bootstrap.ts:47
Perform the host half of the handshake.
postBootstrap(message, ports) must deliver the bootstrap message to the
plugin frame (usually iframe.contentWindow.postMessage(msg, '*', ports));
returning it lets tests intercept the wire. The returned promise rejects
with HANDSHAKE_REJECTED on nonce mismatch, timeout or malformed handshake.
Parameters
postBootstrap
(message, transfer) => void
buildHostHandshake
(plugin) => HostHandshake
options
Returns
Promise<{ handshake: PluginHandshake; nonce: string; port: MessagePort; }>