HTMLMediaElement.onerror
The onerror
property of the HTMLMediaElement
interface is the event handler
for processing error (en-US)
events.
The error
event fires when some form of error occurs while attempting to load or perform the media.
语法
HTMLMediaElement.onerror = EventListener;
Value
A function
which serves as the event handler for the error (en-US)
event. When an error occurs, the specified function will be called. If null
, no error handler is in effect.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard onerror |
Living Standard |
Browser compatibility
No compatibility data found for api.HTMLMediaElement.onerror
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.