HTMLMediaElement.onerror

The onerror property of the HTMLMediaElement interface is the event handler for processing error events.

The error event fires when some form of error occurs while attempting to load or perform the media.

Syntax

HTMLMediaElement.onerror = EventListener;

Value

A function which serves as the event handler for the error event. When an error occurs, the specified function will be called. If null, no error handler is in effect.

Specifications

Specification
HTML Standard (HTML)
# handler-onerror

Browser compatibility

BCD tables only load in the browser

See also