宏任务支持
# | 浏览器 | NodeJS中 |
setTimeout | √ | √ |
setInterval | √ | √ |
setImmediate | x | √ |
requestAnimationFrame | √ | x |
微任务支持
# | 浏览器 | NodeJS中 |
process.nextTick | x | √ |
MutationObserver | √ | x |
Promise.then catch finally | √ | √ |
宏任务支持
# | 浏览器 | NodeJS中 |
setTimeout | √ | √ |
setInterval | √ | √ |
setImmediate | x | √ |
requestAnimationFrame | √ | x |
微任务支持
# | 浏览器 | NodeJS中 |
process.nextTick | x | √ |
MutationObserver | √ | x |
Promise.then catch finally | √ | √ |