Web/API/Notification/maxActions

From Get docs

Note: This feature is available in Web Workers.

Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers.


The maxActions attribute of the Notification interface returns the maximum number of actions supported by the device and the User Agent. Effectively, this is the maximum number of elements in Notification.actions array which will be respected by the User Agent.

Syntax

Notification.maxActions

Value

An integer Number which indicates the largest number of notification actions that can be presented to the user by the User Agent and the device.

Examples

The following snippet logs the maximum number of supported actions.

const maxActions = Notification.maxActions;
console.log('This device can display at most ' + maxActions + ' actions on each notification.');

Specifications

Specification Status Comment
Notifications API Living Standard Living standard

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
maxActions Chrome

Full support Yes

Edge

Full support 18

Firefox

No support No

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

No support No

Chrome Android

Full support Yes

Firefox Android

No support No

Opera Android

Full support Yes

Safari iOS

No support No

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown


See also