Notification:actions 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在 Web Worker 中可用。
Notification
接口的 actions
只读属性提供了可供用户选择以与通知交互的操作。
使用 showNotification()
方法和 Notification()
构造函数的第二个参数的 actions
选项设置操作。
备注:
浏览器通常会限制它们为特定通知显示的最大的操作的数量。检测 Notification.maxActions
静态属性以确定限制的操作的数量。
值
一个表示操作的只读数组。数组中的每个元素都是一个具有以下成员的对象:
规范
Specification |
---|
Notifications API> # dom-notification-actions> |
浏览器兼容性
Loading…