Confusion in event loop explanation of microtask queue #37510
Labels
Content:WebAPI
Web API docs
goal: clarity
(Experimental label) Issues about unclear/confusing/inconcise content.
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide
What specific section or headline is this issue about?
https://arc.net/l/quote/iuxvdrho
What information was incorrect, unhelpful, or incomplete?
https://arc.net/l/quote/iuxvdrho This paragraph portraits that the oldest runnable task in the task queue will be executed first and then the microtasks in microtask queue will be executed in a single iteration of the event loop. Which is not true, as the microtask queue has priority.
What did you expect to see?
The mentioning of in a single iteration of the event loop, the microtasks queue will be executed first untill it is empty, and then the next iteration will look for empty call stack, then empty microtaskqueue then the oldest runnable task in the task queue will be executed.
Do you have any supporting links, references, or citations?
I am beginner in JS, so could be my fault to understand this.
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/html_dom_api/microtask_guide
The text was updated successfully, but these errors were encountered: