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
Is ok.