/ui/elements/alert

Dictionary entries:

  • information

Requires

Methods

(inner) alert(params) → {HTMLElement}

This is an alert element to display information to the user.

It is a framework alternative way to using window.alert() browser function.

mapp.ui.elements.alert({
  text: "Drivetimes have been created."
})
Parameters:
NameTypeDescription
paramsObject

Params for the alert dialog.

Properties
NameTypeAttributesDefaultDescription
params.data_idstring<optional>
'alert'

The data-id attribute value for the dialog.

params.titlestring<optional>

Text to display in the alert header. Defaults to 'Information'.

params.textstring<optional>

Text to display in the alert content.

params.innerContentHTMLElement<optional>

custom HTML fragment to display in the dialog, optional. Overrides text.

params.iconstring<optional>

Custom Material Symbols icon name to use in the header for message clarity. Defaults to 'info'. Set empty string icon: '' to skip the symbol entirely.

Returns:

alert The alert element.

Type: 
HTMLElement