1.

Which property is used to manage multiple event handlers?(a) onmessage(b) onerror(c) both onmessage and onerror(d) postmessageI 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

Answer» 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.


Discussion

No Comment Found

Related InterviewSolutions