监听事件
类型 | 同步 | 异步 | 页面资源(img) | Promise |
---|---|---|---|---|
try/catch | ✔️ | |||
window.onerror | ✔️ | ✔️ | ||
window.addEventListener('error', e=>{}) | ✔️ | ✔️ | ✔️ | |
window.addEventListener('unhandledrejection', e=>{}) | ✔️ |
类型 | 同步 | 异步 | 页面资源(img) | Promise |
---|---|---|---|---|
try/catch | ✔️ | |||
window.onerror | ✔️ | ✔️ | ||
window.addEventListener('error', e=>{}) | ✔️ | ✔️ | ✔️ | |
window.addEventListener('unhandledrejection', e=>{}) | ✔️ |
本文标题:错误监控
本文链接:https://www.haomeiwen.com/subject/feifrhtx.html
网友评论