Notification.maxActions
注: この機能は Web Worker 内で利用可能です
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
maxActions
は Notification
インターフェイスの属性で、端末とユーザーエージェントが対応するアクションの最大数を返します。実質的には、これはユーザーエージェントが尊重する Notification.actions
配列の最大数です。
構文
Notification.maxActions
値
整数の Number
で、ユーザ-エージェントと端末がユーザーに提示することができるできる通知アクションの最大数を示します。
例
以下のスニペットは、対応するアクションの最大数をログ出力します。
const maxActions = Notification.maxActions;
console.log('This device can display at most ' + maxActions + ' actions on each notification.');
仕様書
仕様書 | 状態 | 備考 |
---|---|---|
Notifications API actions の定義 |
現行の標準 | Living standard |
ブラウザーの互換性
BCD tables only load in the browser