Input: source html file, with JavaScript code and with possible errors in web content. Output: JavaScript code, that will print in alert the first error it can catch, after injecting into source html file.
I need to catch all errors that might pop up on web page by using JavaScript, here is non-exhaustive list of errors I need to register:
- JavaScript errors
- all image errors(image is not available, etc.)
- iframes errors(source is not available, etc.)
- other errors
On the first iteration it will be perfect to catch just JavaScript errors(can be done with window.onerror) and Image source errors.