Toasts: Alert

Method alert() shows new alert toast.

Syntax

AWN.alert([message,options])

Parameters

message - optional

Defines message of the toast. Can be any valid HTML or text string. Will be set from defaults if omitted.

options - optional

Instance of Options, which will override globals for this call

Return value

A new HTMLElement instance

Examples

Use defaults

new AWN().alert()

Use custom

new AWN().alert('Custom alert message', {durations: {alert: 0}})