Which two actions will achieve this goal?

You are developing a web application that consumes services from a third-party application.
A web worker processes the third-party application requests in the background. A page in the application
instantiates the web worker process.
You need to establish two-way communications between the web worker process and the page.
Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)

You are developing a web application that consumes services from a third-party application.
A web worker processes the third-party application requests in the background. A page in the application
instantiates the web worker process.
You need to establish two-way communications between the web worker process and the page.
Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A.
From the web worker, use the onconnect event handler of the main page to capture events.

B.
From the main page, use the onmessage event handler of the web worker to capture events.

C.
From the web worker, use the onmessage event handler of the main page to capture events.

D.
From the main page, use the onconnect event handler of the web worker to capture events.

Explanation:
http://www.w3schools.com/html/html5_serversentevents.asp



Leave a Reply 1

Your email address will not be published. Required fields are marked *