MDN self-hosted library · e01.org

ErrorEvent

HTML DOM

no runnable cells web-api-interface upstream source

HTML DOM

The ErrorEvent interface represents events providing information related to errors in scripts or in files.

Constructor

  • ErrorEvent()
  • : Creates an ErrorEvent event with the given parameters.

Instance properties

Also inherits properties from its parent Event.

  • ErrorEvent.message
  • : A string containing a human-readable error message describing the problem.
  • ErrorEvent.filename
  • : A string containing the name of the script file in which the error occurred.
  • ErrorEvent.lineno
  • : An integer containing the line number of the script file on which the error occurred.
  • ErrorEvent.colno
  • : An integer containing the column number of the script file on which the error occurred.
  • ErrorEvent.error
  • : A JavaScript value, such as an Error or DOMException, representing the error associated with this event.

Instance methods

Inherits methods from its parent Event.

Specifications

Browser compatibility

See also

  • Using web workers, most likely objects to raise such an event.
  • Window: error event
  • Navigation: navigateerror event