/ui/elements/alert

Exports the alert dialog method as mapp.ui.elements.alert()

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.

Returns:

alert The alert element.

Type: 
HTMLElement