I am faced with the mention of render queue
in different articles (example, example)
Both authors say that
render callback is given the
I think that is incorrect, unless I have misunderstood. This is my current source of information.
"Immediately after every macrotask, the engine executes all tasks from microtask queue, prior to running any other macrotasks or rendering or anything else."
https://javascript.info/event-loop
The below is an experiment which didn't behave in my code snippet, but it demonstrates that the microtrask from the .then
inside button_one()
take priority over the render change on the button. You can see from the console output of "button one out"
that the microtask is after the button function.