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


© 2026 eLabNext