in Education by
Which property is used to manage multiple event handlers? (a) onmessage (b) onerror (c) both onmessage and onerror (d) postmessage I had been asked this question during an internship interview. The origin of the question is Web Workers topic in section Caching, Debugging and Animation of JavaScript Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right answer is (c) both onmessage and onerror The best I can explain: message event is fired when the worker’s parent receives a message from its worker which is also available via the onmessage property. You can use onmessage and onerror properties if you want to manage multiple event handlers.

Related questions

0 votes
    Which is the property that is triggered in response to JavaScript errors? (a) onexception (b) onmessage (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the default value of the property overrideConsole? (a) 1 (b) true (c) 0 (d) false The ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the tainted property of the window object? (a) Pathname (b) Protocol (c) Default status ( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the purpose of the property PerformanceTiming.navigationStart? (a) Ready to end the navigation (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the purpose of the platform[] property in a navigator? (a) Platform of the script (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the property to access the first child of a node? (a) timestamp.Child1 (b) timestamp. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    How can you dispatch a synthetic event object? (a) dispatchEvent() (b) dispatch() (c) dispatch( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which is the command that is used to spoof the client user agent? (a) setUserAgent (b) spoofAgent ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which database can be used to retrieve blobs? (a) Server-side databases (b) Client-side databases (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which method is used to obtain the drawing context object? (a) getContext() (b) getObject() (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which of the following are methods not used to save charts? (a) pdf() (b) jpeg() (c) bmp( ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which is the function used to loop in an array to view all the values? (a) all() (b) loop( ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which is the function used to loop in an array to view all the values? (a) all() (b) loop() (c) ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    The term lagging power factor is used in which circuits? (a) RLC (b) RC (c) RL (d) LC The question ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 19, 2021 in Education by JackTerrance
...