The following figure is taken from Chapter 3 of the book Secrets of the JavaScript Ninja by Jon Resig. Here the author is explaining the browser event loop.
The book has to say this :
It’s important to note that the browser mechanism that puts the events onto the queue is external to this event loop model. The processing necessary to determine when events have occurred and to push them onto the event queue doesn’t participate in the thread that’s handling the events.
So my question is it correct to say that JavaScript in browser is single threaded? I ask this question because clearly two separate tasks(processing the events and event queing are going on in parallel here).