Documentation

showConfirmDialogAsync()

Displays a confirmation dialog with the specified text and buttons.

showConfirmDialogAsync(
config:
| MessageDialogOptions
| DeferredString
| string
| StringConvertible[],
confirmText?: StringConvertible,
cancelText?: StringConvertible,
otherText?: StringConvertible,
): Promise<boolean | 0>;

Notes

Parameters

Return value

A promise that resolves to true if the confirm button was clicked, false if cancelled, or the number 0 if the alternative option is selected (if any).

Errors

This method throws an error if the modal dialog controller can’t be initialized (i.e. there’s no modal factory or confirm dialog builder).

Related