IFClite TypeScript API
    Preparing search index...

    Interface EmbedderOptions

    interface EmbedderOptions {
        channel?: () => ChannelLike;
        origin: string;
        requestTimeoutMs?: number;
        resumeFrom?: ResumePoint | null;
        retryMs?: number;
        role?: "embedder";
        signal?: AbortSignalLike;
        timeoutMs?: number;
        viewer: WindowLike;
        wants?: (
            | "view.apply"
            | "view.capture"
            | "view.saved"
            | "clash.run"
            | "clash.decisions"
            | "connection.resume"
        )[];
        window?: MessageSourceLike;
    }

    Hierarchy

    • CommonOptions
      • EmbedderOptions
    Index
    channel?: () => ChannelLike

    For tests: makes the channel. Default: new MessageChannel().

    origin: string

    Exactly the viewer's origin, e.g. https://viewer.example.

    requestTimeoutMs?: number

    How long a request may wait for its reply. Default 60 000 ms (applying a view waits for loads).

    resumeFrom?: ResumePoint | null

    Where the previous page of this host left off (ViewerConnection.resumePoint, kept across the reload): a viewer with connection.resume sends the events that page missed again. Events are numbered whether or not it is given.

    retryMs?: number

    Resend the hello this often until it is answered. Default 500 ms.

    role?: "embedder"

    Aborting stops the handshake (it rejects with aborted) or, once connected, closes the connection.

    timeoutMs?: number

    How long the handshake may take. Default 10 000 ms.

    viewer: WindowLike

    The viewer's window: iframe.contentWindow, or what window.open returned.

    wants?: (
        | "view.apply"
        | "view.capture"
        | "view.saved"
        | "clash.run"
        | "clash.decisions"
        | "connection.resume"
    )[]

    The capabilities whose events you want; omitted: all.

    Where window messages arrive. Default: globalThis (the page's window).