vUX / Prompt / v4.1.0
Styled alert, confirm and input dialogs that hand the answer back as a Promise, sit above every modal on the page and never freeze your scripts.
The controls on the left set config on one live instance; the ones on the right are per-call
options for the next dialog. Every answer lands in the log, so you can see what Cancel, Escape and a
backdrop click each resolve with.
The three jobs a prompt usually does in an app: guard a destructive action, collect one value with a check that may go to the server, and cope when two parts of the page ask at the same moment.
Focus starts on Cancel and OK turns red, so a stray Enter cannot delete anything.
The name is checked against a fake server (600ms). "taken" is refused; OK waits while it checks.
Wedding cards
Two instances ask together. The second waits its turn instead of landing on top of the first.
Every config property and every per-call option is checked when it is set, so a typo throws to your code instead of opening a dialog that silently ignores it.