So what exactly goes on with this onmessage/postMessage paradigm?
那么这个 onmessage/postMessage 范型到底说明了什么?
You can see that the Worker script has its own onmessage function.
可以看到,这个 Worker 脚本拥有自己的 onmessage 函数。
Next, for each worker being created, you set its onmessage function.
接下来,针对每个所创建的 worker,设置其 onmessage 函数。
应用推荐