【发布时间】:2013-04-18 00:46:14
【问题描述】:
我正在尝试向我的网站添加一个 onerror 事件。
window.onerror = function() {
alert("an error");
}
但我收到的只是:
notThere();
ReferenceError: notThere is not defined
我错过了什么?
浏览器:Chrome 26.0.1410.64 m
重现步骤:
- 将代码添加到控制台。
- 将 notThere() 添加到控制台
【问题讨论】:
标签: google-chrome window onerror