Currently, we have to pass function name as a string if user click 'ok' or 'cancel' and if you have to pass arguments to that function, we have to use this weird hack of bind() in the string . Also there is no event listener for when the modal closes.
If user clicks on 'OK' (some success button), we can chain then or await it
If user click on 'CANCEL' or close the modal, we can chain what we want to do in catch block
In this way we can make event handling for modal much easier.