Docs (4.0.0)
class GlobalContext method

showAlertDialogAsync

Displays an alert dialog with the specified content and a single dismiss button.

showAlertDialogAsync(config: ConfigOptions.Arg<MessageDialogOptions> | LazyString | string | StringConvertible[], buttonLabel?: StringConvertible): Promise<void>

Notes

  • Use strf to translate content if necessary; this method doesn’t localize strings by default.

Parameters

  • config — An instance of MessageDialogOptions; or a callback function to set options for the dialog to be displayed; or one or more messages to be displayed
  • buttonLabel — The label for the dismiss button (if a single message was provided)

Return value

A promise that resolves when the dialog is closed.

Errors

  • This method throws an error if the theme modal dialog controller can’t be initialized (i.e. there’s no current theme, or the theme doesn’t support modal dialog views).

Related