Notification: requireInteraction property

Note: This feature is available in Web Workers

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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 Standard
# dom-notification-requireinteraction

Browser compatibility

BCD tables only load in the browser

See also