My question is related to how the JS engines implement the pattern of asynchronous events when we do something like bind event handlers on a dom for lets say a click event.?
Do they have something like a separate thread that is listening to all the click events ? When an event does occur , do they refer the bind list and bubble up the events ?
Similar is with Ajax,the asynchronous network call, where the browser spans a new thread that would start listening to the data from the server and when the response is received, it would call the success handler?