PrepAway - Latest Free Exam Questions & Answers

Which three types of objects should you use?

You are developing a web application that uses web workers to process images extracted from an
HTML5 CANVAS object on a web page.
You need to pass messages between the web workers and the web page.
Which three types of objects should you use? (Each correct answer presents a complete solution.
Choose three.)

PrepAway - Latest Free Exam Questions & Answers

A.
JSON

B.
Window

C.
Parent

D.
String

E.
JavaScript

F.
DOM

5 Comments on “Which three types of objects should you use?

  1. rik says:

    I can’t quite picture all the details, but the way I managed to guess all the right answers was like this:

    String:
    Web workers only accept “string” data (you can only send it data as a string (and not e.g. binary data)).
    JavaScript:
    A canvas image is created using JavaScript (unlike SVG, canvas requires JavaScript for anything to show up).
    JSON:
    To send the canvas image information to the web worker, the JavaScript that creates the image would be presented as ‘JavaScript Object Notation’ (JSON) format, which can be easily converted to a string (with JSON.stringify).
    Looking at it that way, I ticked all the boxes…




    0



    0

Leave a Reply