Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MDN声明如下:
一些/许多error事件不会触发window.onerror,您必须专门监听它们
error
window.onerror
这很好,但哪些不调用onerror?
onerror
看起来 quirksmode 详细说明了它将捕获和不会捕获的错误: http ://www.quirksmode.org/dom/events/error.html
如果它有帮助,您特别throw会发现任何错误。
throw