摘要: 单线程 - 只有一个线程,只能做一件事原因 - 避免 DOM 渲染的冲突 解决方案 - 异步 单线程 执行上述代码会发现浏览器一直在刷新,卡顿过后结束 alert点击过后才能继续执行代码 原因- 浏览器需要渲染 DOMJS 可以修改 DOM 结构 JS 执行的时候,浏览器 DOM 渲染会暂停 两段 阅读全文
posted @ 2019-05-10 17:14 旧梦丶 阅读(84) 评论(0) 推荐(0)
摘要: The event loop is what allows Node.js to perform non-blocking I/O operations — despite the fact that JavaScript is single-threaded — by offloading ope 阅读全文
posted @ 2019-05-10 17:12 旧梦丶 阅读(118) 评论(0) 推荐(0)