Created
May 16, 2022 12:59
-
-
Save jkohlin/a0cf536ea1fbcc95c11b5771870bb42e to your computer and use it in GitHub Desktop.
Await an alert dialogue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function Alert(msg) { | |
await (msg => { | |
return Promise.resolve(alert(msg)) | |
})(msg) | |
// things you want to do after the alert OK-button is clicked | |
} | |
Alert('Take your time…') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment