When the browser, somewhere outside the JavaScript engine, has the event inside the JavaScript engine that want to be notified of, its get placed in the event queue, and WHETHER OR NOT the event have a function response to it.

The event queue gets looked at by JavaScript when the execution stack is EMPTY.

JavaScript engine is always running synchronously, what happening is that the browser is asynchronously putting things into event queue.

 

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。