useEmbedNavigator is the low-level host ↔ iframe bridge used by Frame. Most apps should set onArtifactOpen on AiqlProvider instead of calling this hook directly.
Use it when you build a custom iframe wrapper and need to:
- Drive in-iframe navigation (
NAVIGATE/PREFETCH) - Wait for
EMBED_READY - Handle
ARTIFACT_OPENfrom artifact cards inside the embed
Import
Message protocol
All messages usewindow.postMessage. The host validates event.origin and event.source against the iframe.
Host → iframe
Outbound messages are queued until the iframe announces ready.
Iframe → host
EMBED_MESSAGE exports the string constants for these types.
ARTIFACT_OPEN payload
/embed/*, artifact open links call preventDefault and post this message instead of navigating. Outside embed mode they still open in a new tab.
Usage
API Reference
Parameters
Return value
ArtifactOpenEvent
See
AiqlProvider for the recommended host integration.