Javascript event loop: Where do web api's get executed? -


in reading js event loop, curious web api's executed. example, in image, pink box doesn't have name (just says "implementation specific"), leaving me wonder where these web api's executed. call stack, event loop, message queue have names. i've seen philip roberts talk event loop , refers "web api".

so when web api reached in call stack, goes off , gets executed while rest of call stack gets run. web api call go executed? example, if there's set time out of 5 seconds, sitting 5 seconds?

when clicks link, "changecolor" event added message queue.

if message queue empty, executed on next tick. if there other events in queue, executed first prior "changecolor" being executed.


Comments