Description

Toast maker similar to Android.

Details

Members


<static> ToastTypes

Description

Enumeration of accepted types.

Details

Methods


<async, static> success()

Description

Shorthand for type = "success" for module:Toasts.show

Details

<async, static> info()

Description

Shorthand for type = "info" for module:Toasts.show

Details

<async, static> warning()

Description

Shorthand for type = "warning" for module:Toasts.show

Details

<async, static> error()

Description

Shorthand for type = "error" for module:Toasts.show

Details

<async, static> default()

Description

Shorthand for type = "default" for module:Toasts.show

Details

<async, static> show( content, options ) → {Promise}

Description

Shows a simple toast, similar to Android, centered over the textarea if it exists, and center screen otherwise. Vertically it shows towards the bottom like in Android.

Parameters
Name Type Description
content string

The string to show in the toast.

options object

additional options for the toast

Name Type Attributes Default Description
type string <optional>

Changes the type of the toast stylistically and semantically. module:Toasts.ToastTypes

icon string <optional>

URL to an optional icon

timeout number <optional>
3000

Adjusts the time (in ms) the toast should be shown for before disappearing automatically

Returns
  • Promise that resolves when the toast is removed from the DOM
Details