From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/notification/onerror/index.html | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 files/zh-cn/web/api/notification/onerror/index.html (limited to 'files/zh-cn/web/api/notification/onerror') diff --git a/files/zh-cn/web/api/notification/onerror/index.html b/files/zh-cn/web/api/notification/onerror/index.html new file mode 100644 index 0000000000..6cf9d7295d --- /dev/null +++ b/files/zh-cn/web/api/notification/onerror/index.html @@ -0,0 +1,54 @@ +--- +title: Notification.onerror +slug: Web/API/notification/onerror +tags: + - Notification.onerror +translation_of: Web/API/Notification/onerror +--- +

{{APIRef("Web Notifications")}}

+ +

Summary

+ +

{{domxref("Notification")}}  接口的 onerror属性指定一个事件侦听器来接收 {{event("error")}} 事件。

+ +

当一个 {{domxref("Notification")}} 发生错误时,会发生这些事件(在许多情况下,一个错误阻止显示通知)。

+ +

 

+ +

Syntax

+ +
Notification.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('Web Notifications','#dom-notification-onerror','onerror')}}{{Spec2('Web Notifications')}}Initial specification.
+ +

Browser compatibility

+ +

{{Page("/en-US/docs/Web/API/Notification","Browser compatibility")}}

+ +

See also

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