fe-interview icon indicating copy to clipboard operation
fe-interview copied to clipboard

为什么微信小程序要设计成双线程模型?

Open habc0807 opened this issue 4 years ago • 1 comments

habc0807 avatar Aug 31 '20 13:08 habc0807

网页开发渲染线程和脚本线程是互斥的,为了防止长时间的脚本运行可能会导致页面失去响应,在小程序中将两者分开的。只不过小程序的脚本线程,缺少DOM API和BOM API,脚本线程不能通过这些API来操作DOM,只能通过数据去驱动视图的更新。

habc0807 avatar Sep 01 '20 11:09 habc0807