--- title: Notification.actions slug: Web/API/notification/actions tags: - Notification actions - Notifications - Web API - Web Notifications API translation_of: Web/API/Notification/actions ---
{{APIRef("Web Notifications")}}
{{domxref("Notification")}}接口的只读属性actions
返回使用{{domxref("Notification.Notification","Notification()")}}构造函数创建通知时使用actions选项设置的{{domxref("NotificationAction")}}对象列表。这是用户可以在通知上下文中选择立即执行的应用定义的操作列表。
{{AvailableInWorkers}}
var actions[] = Notification.actions;
{{domxref("NotificationAction")}}对象的只读数组。用户在通知中选择每项的单一的功能。
规范 | 状态 | 说明 |
---|---|---|
{{SpecName('Web Notifications','#dom-notification-actions','actions')}} | {{Spec2('Web Notifications')}} | Living standard |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatChrome(53)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOpera(40)}} | {{CompatUnknown}} |
Available in workers | {{CompatChrome(53)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOpera(40)}} | {{CompatUnknown}} |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support |
{{CompatNo}} |
{{CompatChrome(53)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOperaMobile(40)}} | {{CompatUnknown}} |
Available in workers | {{CompatNo}} | {{CompatChrome(53)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOperaMobile(40)}} | {{CompatUnknown}} |
{{Page("/en-US/docs/Web/API/Notifications_API", "Firefox OS notes")}}
{{Page("/en-US/docs/Web/API/Notifications_API", "Chrome notes")}}
{{Page("/en-US/docs/Web/API/Notifications_API", "Safari notes")}}