Say, javascript is in the middle of executing some method, and I'm pressing a button which has some event handler attached. Will the current method execution get paused and the click event handler start executing right away, or will js finish method execution and only then proceed with executing the click event handler?
The event will fire after the current Javascript finishes execution, since Javascript is single threaded. This is also why your browser can lock up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With