--- title: Notification.onshow slug: Web/API/notification/onshow tags: - Notification.onshow translation_of: Web/API/Notification/onshow ---

{{APIRef("Web Notifications")}}

Summary

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

当一个 {{domxref("Notification")}} 显示时,会发生这些事件。

Syntax

Notification.onshow = function() { ... };

Specifications

This event handler is no longer listed in the Notifications API spec.

Browser compatibility

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

See also