Which line of code should you use?

DRAG DROP
You are creating a web worker for an HTML5 application.
The following tasks must be performed from within the web worker;
Register an event listener for the web worker
Start and stop the web worker
You need to define a function that performs the required tasks.
Which line of code should you use? (To answer, dragthe appropriate line or lines of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may needto drag the split bar between panes or scroll to view content.)

DRAG DROP
You are creating a web worker for an HTML5 application.
The following tasks must be performed from within the web worker;
Register an event listener for the web worker
Start and stop the web worker
You need to define a function that performs the required tasks.
Which line of code should you use? (To answer, dragthe appropriate line or lines of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may needto drag the split bar between panes or scroll to view content.)

A.

Explanation:



Leave a Reply 3

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


Dovlet Mamenov

Dovlet Mamenov

It is not clear what does the first row in an answer do?
self.addEventListener(“message”, function(event))
why there is no function body?
It confirms to requirement set in the task: Register an event listener for the web worker,
but does it have a meaning?