Which code segment should you use?

You develop an application to host user-generated HTML and JavaScript content.
A common error handler in your application must process all unhandled errors.
You need to implement global error handling for the application.
Which code segment should you use?

You develop an application to host user-generated HTML and JavaScript content.
A common error handler in your application must process all unhandled errors.
You need to implement global error handling for the application.
Which code segment should you use?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
GlobalEventHandlers.onerror
An event handler for runtime script errors.
Syntax
window.onerror = funcRef;Reference: GlobalEventHandlers.onerror



Leave a Reply 1

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