Skip to content

@serenity-is/corelib / alertDialog

Function: alertDialog()

alertDialog(message, options?): Partial<Dialog>

Defined in: src/base/dialogs.tsx:1083

Displays a modal alert dialog with a single OK button.

Parameters

message

RenderableContent

Text or renderable content shown in the dialog body.

options?

MessageDialogOptions

Additional MessageDialogOptions.

Returns

Partial<Dialog>

A Dialog handle (partial when falling back to the native alert()), whose result is "ok".

Remarks

Falls back to the native alert() when neither Bootstrap modal nor jQuery UI dialog is available.

Example

alertDialog("An error occurred!");