postmessage

  • 网络发送消息;投递;消息方式
postmessagepostmessage
  1. Control returns immediately from PostMessage and the message gets processed later .

    控制会从PostMessage立即返回,该消息是后来才处理的。

  2. This data is then sent back to the parent thread by using the postMessage function .

    该数据随后会被通过postMessage函数发送回母线程。

  3. This is invoked when you call postMessage from the main thread .

    该函数在您从主线程调用postMessage时调用。

  4. Of course , postMessage is an asynchronous function ; you call it and it immediately returns .

    当然,postMessage是一个异步函数;您调用它,它就立即返回。

  5. The data you passed from the page script is passed to the postMessage function in the message object .

    从页面脚本传来的数据被传递到message对象中的postMessage函数。

  6. Finally , to initiate the worker , call postMessage with some data for it to work on .

    最后,为了初始化这个worker,用一些数据调用postMessage以便它能工作起来。

  7. The object passed in to postMessage becomes the data property on the object passed to the onmessage method .

    这样一来,传递给postMessage的这个对象就成为了传递给onmessage方法的那个对象的数据属性。

  8. To send the thread a message , the postMessage method on the Worker instance is invoked .

    要向线程发送一个消息,需要调用Worker实例上的postMessage方法。

  9. It uses the onmessage / postMessage paradigm to receive and send data from its parent thread .

    它使用onmessage/postMessage范型来从它的母线程接收和发送数据。

  10. So what exactly goes on with this onmessage / postMessage paradigm ?

    那么这个onmessage/postMessage范型到底说明了什么?

  11. When you finish processing the data in the Worker script , you invoke the postMessage function to send data back to the main thread .

    当您处理完Worker脚本中的数据时,调用postMessage函数将数据返回主线程。

  12. The Window Name protocol is more involved , but it must be used in older browsers that do not support window . postMessage () .

    这里涉及到了更多的WindowName协议,但是它必须在并不支持window.postMessage()的老式浏览器中使用。

  13. Generally , the handler will run its own postMessage () method to return a message to the calling code , and then the port 's start () method generates an enable message process .

    通常,这个处理程序会执行自己的postMessage()方法将消息返回给调用代码,然后port的start()方法就会生成一个启用消息过程。