Is there a way to see the “threads” that JavaScript is creating? For example, if I have an event handler attached to a DOM element, I assume that JavaScript will implicitly make a new thread to run that code in the background? If so, is there a way to see (e.g. via Firebug, WebKit inspector, etc.) the different “threads” that JavaScript has open? (And if it’s not threads that JavaScript is using, then how do event handlers work “behind-the-scenes”?)
Share
JavaScript doesn’t make threads. The underlying browser might be handling events in its own threaded environment, and then causing your JavaScript interpreter to run the handlers, but there is no thread access in JavaScript, and how the browser works is implementation specific.