The error event is fired when an error occurred; the exact circumstances vary, events by this name are used from a variety of APIs.
General info
- Specification
- DOM L3
- Interface
UIEventif generated by a user interface element,MediaRecorderErrorEventif generated by the MediaStream Recording API, andEventotherwise.- Bubbles
- No
- Cancelable
- No
- Target
- Element
- Default Action
- None
Properties
For UI events
These events are of type UIEvent.
This interface also inherits properties of its parent, Event.
UIEvent.cancelBubble- Is a
Booleanindicating whether the bubbling of the event has been canceled or not.
UIEvent.detailRead only- Returns a
longwith details about the event, depending on the event type. UIEvent.isCharRead only- Returns a
Booleanindicating whether the event produced a key character or not. UIEvent.layerXRead only- Returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerYRead only- Returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageXRead only- Returns the horizontal coordinate of the event relative to the whole document.
UIEvent.pageYRead only- Returns the vertical coordinate of the event relative to the whole document.
UIEvent.sourceCapabilitiesRead only- Returns an instance of the InputDeviceCapabilities interface which provides information about the physical device responsible for generating a touch event.
UIEvent.viewRead only- Returns a
WindowProxythat contains the view that generated the event. UIEvent.whichRead only- Returns the numeric
keyCodeof the key pressed, or the character code (charCode) for an alphanumeric key pressed.
{{OpenEventProperties()}}
view Read only
WindowProxy
document.defaultView (window of the document)
detail Read only
long (float)
0.
For MediaStream Recording events
These events are of type MediaRecorderErrorEvent.
Inherits properties from its parent interface, Event.
errorRead only- The
DOMExceptionthat was thrown that caused the error event to be sent. Read only.
See also
GlobalEventHandlers.onerror- Events sent to
Window.onerrorandElement.onerror HTMLMediaElement.onerror- Events sent to
HTMLMediaElement, including<audio>and<video> MediaRecorder.onerror- Events sent to
MediaRecorder.onerror, of typeMediaRecorderErrorEvent

