aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/notification/onshow/index.html
blob: 0b3feb6fdc7c7a80ab0b4f84c2e82607d446dcab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: Notification.onshow
slug: Web/API/notification/onshow
tags:
  - Notification.onshow
translation_of: Web/API/Notification/onshow
---
<p>{{APIRef("Web Notifications")}}</p>

<h2 id="Summary" name="Summary">Summary</h2>

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

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

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="eval">Notification.onshow = function() { ... };
</pre>

<h2 id="Specifications">Specifications</h2>

<p>This event handler is no longer listed in the <a href="https://notifications.spec.whatwg.org/">Notifications API spec</a>.</p>

<h2 id="Browser_compatibility">Browser compatibility</h2>

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

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("Notification")}}</li>
 <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API">Using the Notifications API</a></li>
</ul>