A widget that renders the TECSAFE debug console, an iframe UI that shows the widget side of the SDK message exchange and can send arbitrary messages back to the SDK. Use it while integrating the SDK to confirm that messages arrive as expected; it is not meant for production pages.

Hierarchy (view full)

Constructors

Properties

The widget manager API

The widget manager configuration

debugName: "Debug" = 'Debug'

The short name used to identify this widget kind in debug tooling. Kept explicit rather than derived from the class name, which is not stable in the minified bundle.

el: HTMLElement

The element to attach the widget to

iframe: HTMLIFrameElement = null

The iframe element

listeners: Map<string, MessageEventHandler<any>[]> = ...
uiPath: "debug" = 'debug'

The path to the iframe which will be appended to the uiBaseURL to get the full URL

Methods

  • Internal method that returns a short human readable label for this widget, used by the SDK debug overlay to tell widgets apart.

    Returns string

    The debug label

  • Triggers all listeners for a given message type

    Parameters

    • type: string

      The message type

    • envelope: MessageEnvelope<any>

      The message envelope containing the payload

    • sdk: ISDK

      The SDK instance

    • widget: IWidget

      The widget instance

    Returns void