Skip to main content

Function: askConfirm()

askConfirm(parent, options): Promise<boolean>

Defined in: src/ui/ask/index.ts:82

Ask the user to confirm in a dialog shown in parent, resolving true if they agree (false for the cancel button, Escape or a press outside it).

Parameters​

parent​

Node

options​

AskOptions

Returns​

Promise<boolean>

Example​

if (await askConfirm(this.renderRoot, { heading: "Delete preset", message: 'Delete "Ink"?', confirm: "Delete",
cancel: "Cancel", cancelling: true })) remove();