PrepAway - Latest Free Exam Questions & Answers

Which line of code should you use?

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 need to drag the split
bar between panes or scroll to view content.)

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:

20 Comments on “Which line of code should you use?

  1. JM says:

    The following line of code
    self.addEventListener(‘message’, function(event));

    is incorrect and does not match the last line of code
    }, false);

    and should be replaced with:
    self.addEventListener(‘message’, function(event) {




    0



    0

Leave a Reply