docs icon indicating copy to clipboard operation
docs copied to clipboard

do you mean setTimeout task type has lower priority than browser-rendering/user-input? if yes, could you give me official docs link or any code example to prove it.

Open rjwaltz opened this issue 11 months ago • 2 comments

source file link

function microtask() {
  console.log("microtask");
}

function task() {
  console.log("task");
}

setTimeout(task, 0);
queueMicrotask(microtask);
  1. Log "microtask"
  2. Return to the event loop and allow rendering/input callbacks to occur if appropriate
  3. Log "task"

rjwaltz avatar Jan 30 '25 21:01 rjwaltz

https://github.com/fergald/docs/issues/18#issue-2821849114

mihirpatel922-ctrl avatar Sep 06 '25 04:09 mihirpatel922-ctrl

https://github.com/fergald/docs/issues/18#issue-2821849114

mihirpatel922-ctrl avatar Sep 06 '25 04:09 mihirpatel922-ctrl