reporting.alerts
Send notifications and confirmations to users.
confirm()
confirm(
message
,options
):void
Display an confirmation dialog for a user. Run a function when the user confirms or cancels.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | The textual message displayed to the user in the alert. |
options | object | |
options.cancelText ? | string | The textual content of the "cancel" button. Defaults to "Cancel" if not provided. |
options.confirmText ? | string | The textual content of the "confirm" button. Defaults to "Confirm" if not provided. |
options.onCancel ? | () => void | Function that runs if the "cancel" button is clicked. |
options.onConfirm | () => void | Function that runs if the "confirm" button is clicked. |
Returns
void
notify()
notify(
message
,options
?):void
Display an alert for a user.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | The textual message displayed to the user in the alert. |
options ? | object | |
options.level ? | AlertLevel | How the alert should be displayed to the user. Defaults to info if not provided. |
Returns
void