@kadanza/extension-sdk
    Preparing search index...

    Interface ExtensionSDKHostOptions

    Options for ExtensionSDKHost.

    Platform code supplies token minting and page-settings persistence via callbacks; the host owns only the postMessage protocol.

    interface ExtensionSDKHostOptions {
        getContentWindow: () => Window | null;
        onNavigationChange?: (payload: NavigationChangePayload) => void;
        onUpdatePageSettings?: (
            settings: PageSettings,
        ) => boolean | Promise<boolean>;
        origin: string;
        resolveAuthToken: () => AuthToken | Promise<AuthToken>;
        resolveHandshakePayload: (
            extensionSDKHost: IExtensionSDKHost,
        ) => Partial<HandshakePayload> | Promise<Partial<HandshakePayload>>;
    }
    Index
    getContentWindow: () => Window | null

    Returns the iframe contentWindow, or null if not ready.

    onNavigationChange?: (payload: NavigationChangePayload) => void

    Called when the child reports a route change via NAVIGATION_CHANGE (spontaneous or as ACK to IExtensionSDKHost.requestNavigationChange).

    onUpdatePageSettings?: (settings: PageSettings) => boolean | Promise<boolean>

    Persists page settings from UPDATE_PAGE_SETTINGS. Return true on success; the host emits PAGE_SETTINGS_UPDATED.

    origin: string

    Extension origin used as postMessage targetOrigin / source filter.

    resolveAuthToken: () => AuthToken | Promise<AuthToken>

    Resolves a fresh auth token when the child sends REQUEST_TOKEN_REFRESH.

    resolveHandshakePayload: (
        extensionSDKHost: IExtensionSDKHost,
    ) => Partial<HandshakePayload> | Promise<Partial<HandshakePayload>>

    Builds the handshake payload when the child sends HANDSHAKE_INIT. Context fields are optional; send designTokens whenever a tenant is in context. spaceId / pageId apply to Experience Pages only.