Notification: requireInteraction property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

Note: This feature is available in Web Workers.

The requireInteraction read-only property of the Notification interface returns a boolean value indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.

Note: This can be set when the notification is first created by setting the requireInteraction option to true in the options object of the Notification() constructor.

Value

A boolean value.

Specifications

Specification
Notifications API
# dom-notification-requireinteraction

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
requireInteraction
Chrome – Full support
Chrome 47 (Release date: 2015-12-01)
footnote Full support
Edge – Full support
Edge 17 (Release date: 2018-04-30)
footnote Full support
Firefox – No support
Firefox 117 (Release date: 2023-08-29)
disabled
disabled From version 117 users must explicitly set the dom.webnotifications.requireinteraction.enabled preference to true. To change preferences in Firefox, visit about:config.
Firefox – Partial support
Firefox 117 (Release date: 2023-08-29)
footnote Partial support
footnote Only supported on Windows. Behind a flag on other operating systems.
Opera – Full support
Opera 34 (Release date: 2015-12-08)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 47 (Release date: 2015-12-02)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 117 (Release date: 2023-08-29)
footnote Partial support
footnote Only supported on Windows. Behind a flag on other operating systems.
Opera Android – Full support
Opera Android 34 (Release date: 2015-12-16)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 5 (Release date: 2016-12-15)
footnote Full support
WebView Android – No support
WebView Android
footnote
footnote See bug 40443309
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
See implementation notes.
User must explicitly enable this feature.
Has more compatibility info.

See also