Mimic Window. onerror in Opera using javascript

后端 未结 4 1729
眼角桃花
眼角桃花 2021-01-17 21:40

I am currently working on a web application, I have a JS logging mechanism that Handles Javascript error that are not caught by the js code inside the page. I am using windo

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-17 22:39

    there is a mention here that Opera now supports window.onerror:

    http://my.opera.com/ODIN/blog/2011/11/07/what-s-new-in-opera-development-snapshots-4-november-2011-edition

    but window.onerror does not seem to work in Opera Mini (e.g. user agent "Opera/9.80 (J2ME/MIDP; Opera Mini/7.1.32422/30.3214; U; en) Presto/2.8.119 Version/11.10"). This makes it really hard to debug javascript on mobiles with Opera Mini.

提交回复
热议问题