Hello, I use Webix.alert and I need to make sure that the script does not continue executing further until the Ok button is pressed. How can this be done?
async function uploadFileAsync() {
let input = document.getElementById('file-input');
input.onchange = async e => {
let file = e.target.files[0];
// Check file size
if (file.size >= 15728640) {
webix.alert({
title: "Error",
text: "The file size should not exceed 15 MB!",
type: "alert-error"
}).then(function () {
return;
});
}
// Do not execute until Ok is pressed
// <...>
};
input.click();
}