Skip to content

Intermact API Reference / @intermact/react / buildEmbedIframe

Function: buildEmbedIframe()

buildEmbedIframe(options): string

Defined in: react/src/embed/web-component.ts:154

Build a self-contained <iframe srcdoc> snippet that hosts a serialized scene via the <intermact-embed> custom element (design.md §17). The scriptUrl must point at a bundle that imports and calls defineIntermactEmbed. The iframe sandboxes the scene from the host page, so a share-url drops a live, isolated Intermact scene anywhere.

Parameters

options

EmbedIframeOptions

Returns

string

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)