It's occurred to me that a lot of JS developers use `alert`, `prompt` and `confirm` so little that they don't realize, or just haven't observed, that it blocks your thread completely. Nothing will execute on the UI thread while the dialog is up.
-
Show this thread
-
This gets tricky if your UI thread is coordinating with a worker or streaming data from an external source. It also does things like pauses animation loops, etc.
1 reply 0 retweets 4 likesShow this thread -
I suspect that developers that worked with JavaScript before console.log was a thing are probably more aware of this behavior.
1 reply 0 retweets 7 likesShow this thread
Replying to @BenLesh
It's been such a long time ago since I've used them that I'd forgotten they exist.
12:04 PM - 28 Jan 2020
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.