--- title: Notification.onshow slug: Web/API/notification/onshow tags: - Notification.onshow translation_of: Web/API/Notification/onshow ---
{{APIRef("Web Notifications")}}
{{domxref("Notification")}} 接口的onshow属性指定一个事件侦听器来接收 {{event("show")}}事件。
当一个 {{domxref("Notification")}} 显示时,会发生这些事件。
Notification.onshow = function() { ... };
This event handler is no longer listed in the Notifications API spec.
{{Page("/en-US/docs/Web/API/Notification","Browser compatibility")}}