PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

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

One Comment on “Which code segment should you use?


Leave a Reply