Notification.onerror

Summary

Notification 接口的 onerror 属性指定一个事件侦听器来接收 error (en-US) 事件。

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

Syntax

Notification.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.

规范

Specification
Notifications API Standard
# dom-notification-onerror

浏览器兼容性

BCD tables only load in the browser

See also