Chrome finds out which external script caused the Script error. "

Hey, this is a "Script Error" messsage thrown at window.onerror without any details when an error occurs in scripts that are in an external domain.

However, even if we do not know the error information, it would still be possible to find out which script file threw the error.

I am logging errors from window.onerror, and if you can find out in which script file the "w370>" error occurred, it would be easy to decide whether it can be ignored.

This is a thread that talks about this kind of error, but I can not find somewhere to find where the file error occurred.

"Script Error"

Thanks for the help in advance.

+4
source share
1 answer

Check item and check console tab. If an error is mentioned here than on the right side of the error, a script creation error will be mentioned.

+1
source

Source: https://habr.com/ru/post/1492223/


All Articles