aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/notification/actions/index.html
blob: 587137cc1360bfe48b8774b4fd90e12509c3d1f5 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: Notification.actions
slug: Web/API/notification/actions
tags:
  - Notification actions
  - Notifications
  - Web API
  - Web Notifications API
translation_of: Web/API/Notification/actions
---
<p>{{APIRef("Web Notifications")}}</p>

<p><span class="seoSummary">{{domxref("Notification")}}接口的只读属性<strong><code>actions</code></strong>返回使用{{domxref("Notification.Notification","Notification()")}}构造函数创建通知时使用actions选项设置的{{domxref("NotificationAction")}}对象列表。这是用户可以在通知上下文中选择立即执行的应用定义的操作列表。</span></p>

<p>{{AvailableInWorkers}}</p>

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

<pre class="syntaxbox">var <em>actions</em>[] = <em>Notification</em>.actions;</pre>

<h3 id="Return_Value" name="Return_Value"></h3>

<p>{{domxref("NotificationAction")}}对象的只读数组。用户在通知中选择每项的单一的功能。</p>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">说明</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Notifications','#dom-notification-actions','actions')}}</td>
   <td>{{Spec2('Web Notifications')}}</td>
   <td>Living standard</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

{{Compat("api.Notification.actions")}}

<h2 id="更多">更多</h2>

<ul>
 <li><a href="/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API">Using the Notifications API</a></li>
</ul>