Notification: requireInteraction-Eigenschaft

Limited availability

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

Sicherer Kontext: Diese Funktion ist nur in sicheren Kontexten (HTTPS) in einigen oder allen unterstützenden Browsern verfügbar.

Hinweis: Diese Funktion ist in Web Workers verfügbar.

Die requireInteraction schreibgeschützte Eigenschaft des Notification-Interfaces gibt einen booleschen Wert zurück, der angibt, dass eine Benachrichtigung aktiv bleiben sollte, bis der Benutzer sie anklickt oder schließt, anstatt sich automatisch zu schließen.

Hinweis: Dies kann festgelegt werden, wenn die Benachrichtigung zuerst erstellt wird, indem die requireInteraction-Option auf true im Optionsobjekt des Notification()-Konstruktors gesetzt wird.

Wert

Ein boolescher Wert.

Spezifikationen

Specification
Notifications API
# dom-notification-requireinteraction

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
requireInteraction

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.

Siehe auch