interface Options {
    iframeParent: HTMLElement;
    languageCode: string;
    onIframeCreate: ((iframe) => void);
    socketEndpoint: string;
    transport: "websocket" | "longpoll";
}

Properties

iframeParent: HTMLElement

The element to render the chat iframe in.

languageCode: string

The language to render the iframe in.

Can be changed later using the updateLanguageCode function.

Example: 'en', 'es', 'de', 'nl'

onIframeCreate: ((iframe) => void)

Callback when the iframe is first created to allow things like class to be set.

Type declaration

    • (iframe): void
    • Parameters

      • iframe: HTMLIFrameElement

      Returns void

socketEndpoint: string

The WebSocket URL to the socket.

Example: 'wss://inbox.dialox.ai/socket'

transport: "websocket" | "longpoll"

The socket transport to use.

Websocket (default) might still fall back to LongPoll automatically.

Generated using TypeDoc