-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macrotask和microtask的疑问 #2
Comments
@Oscar19921030 因为精力有限,所以没有去深入研究Safari的原理哈,文中也提到了只针对chrome哈~ 这个例子我在safari 11下挺正常的? 不过有个东西,我为了不让概念太多导致混乱,特意没做展开,叫做Job。Safari目前是将
这里写的是can be,所以行为不要太离谱,都能接受。。。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
console.log(1);
setTimeout(() => { console.log(2) }, 0);
Promise.resolve()
.then(() => { console.log(3) })
.then(() => { console.log(4) })
.then(()=>{console.log(6)})
console.log(5);
这串代码在chrome浏览器中能够符合文章中的macrotask和microtask运行优先级的说法;但是放到Safari中就很诡异
safari版本 10.0.3 (12602.4.8)
The text was updated successfully, but these errors were encountered: