Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Uncaught (in promise) cancel

swal({
  …
}).then(function(json_data) {
  …
}, function(dismiss) {
  if (dismiss === 'cancel') { // you might also handle 'close' or 'timer' if you used those
    // ignore
  } else {
    throw dismiss;
  }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Uncaught #cancel
ADD COMMENT
Topic
Name
7+1 =