JavaScript Notes and Examples

Events

Events come in to the event table, and then are added to the event queue for processing by the event loop.

Note that the browser renders changes as fast as it can, but it happens only when the JS call stack is empty. It’s like a regular event, only higher priority. If you are hogging up the stack (if your code blocks), then the browser is forced to wait.