createPopup method

Popup createPopup(
  1. ConversationBuilder? conversation,
  2. PopupOptions? options
)

Creates a Popup UI

@remarks The Popup is a beautiful, well positioned box containing a conversation. It shows a single conversation, without means to switch between conversations. In order to have a popup on each site you need to call createPopup on any page you want to show a popup with the conversation.

Passing null for selectedConversation parameter will initialize TalkJS upon mounting, but will not display a UI yet. You need to call Popup.select(conversation) in order to render the UI with a conversation. This is useful for preloading the Popup in some situations.

If you call createPopup() without a parameter, or when passing undefined, it is going to render the latest conversation in the UI upon mounting. @param conversation - The conversation to show on the UI.

Implementation

external Popup createPopup(
    ConversationBuilder? conversation, PopupOptions? options);