eLabSDK2.Bootloader.IframeFactory

Production iframe factory. create() builds a real
<iframe sandbox="allow-scripts"> (no allow-same-origin, so the iframe
has an opaque origin and cannot read host cookies / localStorage / DOM),
loads the srcdoc HTML built by buildSrcdoc, then transfers one end of a
fresh MessageChannel to the iframe via the init postMessage. The
returned MountedIframe carries the host-side port that AddonChannel
wraps. destroy() closes the port and removes the iframe node;
idempotent against a port already closed by the channel itself.

Implements

Methods

createSection

createSection(host, options): Promise<MountedIframe>

A visible section frame. Its random name keeps other frames from targeting it, and it accepts
only a section init. A later load is reported through onNavigate, never initialised again.

Parameters

NameType
hostHTMLElement
optionsSectionIframeOptions

Returns

Promise<MountedIframe>

Implementation of

IframeFactoryLike.createSection


© 2026 eLabNext


Did this page help you?