Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
812 views
in Technique[技术] by (71.8m points)

原生的Promise的微任务是怎么实现的

看别人参照A+规范写的都是setTimeout,所以很想知道原生的Promise的微任务是怎么实现的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

浏览器实现的+1,微任务这种调度细节由host去决定,ECMAScript规范中没有微任务宏任务的区分的
https://www.zhihu.com/questio...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...