InterviewSolution
Saved Bookmarks
| 1. |
How can you send data using a Worker object?(a) postMessage()(b) sendMessage()(c) Message()(d) post() |
|
Answer» Correct answer is (a) postMessage() The best I can explain: Once you have a Worker object, you can send data to it with postMessage(). The value you pass to postMessage() will be cloned, and the resulting copy will be delivered to the worker via a message event. postMessage() sends a message — which can consist of any JavaScript object — to the worker’s inner scope. |
|