docs
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.
function microtask() {
console.log("microtask");
}
function task() {
console.log("task");
}
setTimeout(task, 0);
queueMicrotask(microtask);
- Log "microtask"
- Return to the event loop and allow rendering/input callbacks to occur if appropriate
- Log "task"
https://github.com/fergald/docs/issues/18#issue-2821849114
https://github.com/fergald/docs/issues/18#issue-2821849114