The confirm() method displays a pre-configured modal dialog that displays a custom message and "OK" and "Cancel" buttons.
A Promise. The success handler of the promise will be called when the modal dialog is closed (using either button or by clicking the background). The failure handler is never called.
The success handler receives the args parameter from onClosed event handler.
In addition to the standard properties you can specify custom button text using the options object: