Widget interface. Every widget implements this interface.

Type Parameters

Hierarchy

  • Widget

Methods

  • Mount a widget to a DOM ref element.

    Parameters

    • id: string

      ID of the DOM element where the widget will be mounted.

    • Optional params: checkout.WidgetParameters[T]

      widget parameters.

    Returns void

  • Unmount a widget and reset parameters

    Returns void

  • Update the widget properties

    Parameters

    Returns void

  • Add a listener for a widget event.

    Type Parameters

    • KEventName extends string | number | symbol

    Parameters

    • type: KEventName
    • callback: ((data) => void)

      function to execute when the event is received.

    Returns void

  • Removes an event listener for a widget event.

    Type Parameters

    • KEventName extends string | number | symbol

    Parameters

    • type: KEventName

      Widget specific event name.

    Returns void

Generated using TypeDoc