Constructor
new LiveQuotesDialog(projectId, getToken)
Parameters:
| Name | Type | Description |
|---|---|---|
projectId | string | ID of the project whose embeds are displayed. |
getToken | function | async function returning the current auth token, or null |
Classes
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:
| Name | Type | Description |
|---|---|---|
url | string | Public URL of the embed. |
btn | HTMLButtonElement | Button whose label is updated during copy. |
_copyText(text, btn)
Copies text to the clipboard and briefly updates the button label.
Parameters:
| Name | Type | Description |
|---|---|---|
text | string | Text to copy. |
btn | HTMLButtonElement | Button whose label is updated during copy. |
(async) _deleteEmbed(embedId, row)
Deletes an embed via the API and refreshes the list on success.
Parameters:
| Name | Type | Description |
|---|---|---|
embedId | string | ID of the embed to delete. |
row | HTMLElement | Row 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:
| Name | Type | Description |
|---|---|---|
embeds | Array.<object> | Embed objects returned by the server. |
close()
Removes the dialog and scrim from the DOM.