--- 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 |