From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/htmlmediaelement/onerror/index.html | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 files/zh-cn/web/api/htmlmediaelement/onerror/index.html (limited to 'files/zh-cn/web/api/htmlmediaelement/onerror') diff --git a/files/zh-cn/web/api/htmlmediaelement/onerror/index.html b/files/zh-cn/web/api/htmlmediaelement/onerror/index.html new file mode 100644 index 0000000000..8589fdd95a --- /dev/null +++ b/files/zh-cn/web/api/htmlmediaelement/onerror/index.html @@ -0,0 +1,48 @@ +--- +title: HTMLMediaElement.onerror +slug: Web/API/HTMLMediaElement/onerror +translation_of: Web/API/HTMLMediaElement/onerror +--- +
{{APIRef("HTML DOM")}}
+ +

The onerror property of the {{domxref("HTMLMediaElement")}} interface is the {{domxref("EventHandler")}} for processing {{event("error")}} events.

+ +

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

+ +

语法

+ +
HTMLMediaElement.onerror = EventListener;
+ +

Value

+ +

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

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','webappapis.html#handler-onerror','onerror')}}{{Spec2('HTML WHATWG')}}
+ +

Browser compatibility

+ + + +

{{Compat("api.HTMLMediaElement.onerror")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf