creates a confirm box
| text | string|object | mandatory, the box text as a string, or the box configuration object | 
| type | string|function | optional, the type of a confirm modal box or the callback function | 
| callback | function | optional, the callback function (can be used, if the modal box type is defined as a second parameter) | 
| promise | the Promise object | 
// basic initialization 
webix.confirm("Test confirm", "confirm-warning")
    .then(function(result){
        webix.message(result);
    })
        .fail(function(){
            webix.message("Cancel");
        });
 
// extended initialization
webix.confirm({
    title: "Close",
    text: "You can't close this window!",
    type:"confirm-error"
})
    .then(function(result){
        webix.message(result);
    })
        .fail(function(){
            webix.message("Cancel");
        });
The method can be used in 2 ways:
1. In the Basic form, the method may take the following parameters:
webix.confirm("Test confirm", "confirm-error");
2. In the Extended form, the method takes one parameter - an object with box parameters. The parameters are:
The full list of possible box parameters is given in the related article.
webix.confirm({
    title: "Close",
    text: "You can't close this window!",
    type:"confirm-error"
});
Since webix.confirm() returns a promise, there is no need in a callback functions. However, you can add a callback if this is necessary. As a parameter, the function receives the confirm result status (true or false).
// basic initialization 
webix.confirm("Test confirm", "confirm-warning", function(result){
    webix.message(result);
});
 
// extended initialization
webix.confirm({
    title: "Close",
    text: "You can't close this window!",
    type:"confirm-error",
    callback:function(result){
        webix.message(result);
    }
});