Notification:maxActions 静态属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在 Web Worker 中可用。
Notification
接口的 maxActions
只读静态属性返回设备和用户代理支持的最大操作的数量。实际上,这是会被用户代理遵守的 Notification.actions
数组中的元素的最大数量。
值
一个表示用户代理和设备可以向用户呈现的通知操作的最大数量的整数。
示例
以下代码片段打印了支持的操作的最大数量。
js
const maxActions = Notification.maxActions;
console.log(`此设备最多可以对每个通知显示 ${maxActions} 个操作。`);
规范
Specification |
---|
Notifications API # dom-notification-maxactions |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
maxActions static property |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.