Get to know MDN better
Esta página ha sido traducida del inglés por la comunidad. Aprende más y únete a la comunidad de MDN Web Docs.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since julio de 2015.
Un manejador de eventos para errores en scripts en tiempo de ejecución.
Note that some/many error events do not trigger window.onerror, you have to listen for them specifically.
El evento de error es lanzado cuando ocurre un error en el script.
Cuando se use el marcado html en línea (<body onerror="alert('an error occurred')>...), los argumentos son anónimos. Pueden ser referenciados usando desde arguments[0] hasta arguments[2].
No hay llamante Components.stack.caller que recuperar. (Vea bug 355430.)
This page was last modified on 24 jun 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.