how to stop user from clicking outside alert box js

JavaScript
allowOutsideClick: false
Source

Also in JavaScript: