here, have a near-replacement! (needs styling, and proper "modal" display, but it works)
instead of `const response = window.confirm(message)` you do `const response = await confirm(message)` (extending this to `prompt` is left as an exercise for the reader)
https://s.thenautilus.net/files/d47c88c3-d7c0-4408-a902-617bdd69d69b