LiveQuotesDialog

LiveQuotesDialog — lists all embed quotes for a project.

Constructor

new LiveQuotesDialog(projectId, getToken)

Parameters:
NameTypeDescription
projectIdstringID of the project whose embeds are displayed.
getTokenfunctionasync function returning the current auth token, or null

Classes

LiveQuotesDialog

Methods

_buildDOM()

Builds and attaches the dialog and scrim DOM elements.

_copyEmbedCode(url, btn)

Copies the iframe embed snippet for the given URL to the clipboard.
Parameters:
NameTypeDescription
urlstringPublic URL of the embed.
btnHTMLButtonElementButton whose label is updated during copy.

_copyText(text, btn)

Copies text to the clipboard and briefly updates the button label.
Parameters:
NameTypeDescription
textstringText to copy.
btnHTMLButtonElementButton whose label is updated during copy.

(async) _deleteEmbed(embedId, row)

Deletes an embed via the API and refreshes the list on success.
Parameters:
NameTypeDescription
embedIdstringID of the embed to delete.
rowHTMLElementRow element to restore the delete button on failure.

(async) _load()

Fetches the embed list from the server and renders it.

_render(embeds)

Renders the list of embed rows into the dialog body.
Parameters:
NameTypeDescription
embedsArray.<object>Embed objects returned by the server.

close()

Removes the dialog and scrim from the DOM.