Notification.badge

Limited availability

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

Note : Cette fonctionnalité est disponible via les Web Workers.

Contexte sécurisé: Cette fonctionnalité est uniquement disponible dans des contextes sécurisés (HTTPS), pour certains navigateurs qui la prennent en charge.

La propriété badge de l'interface Notification renvoie l'URL de l'image utilisée pour représenter la notification lorsqu'il n'y a pas assez d'espace pour afficher la notification elle-même.

Syntaxe

js
const url = Notification.badge;

Valeur

Une USVString contenant une URL.

Spécifications

Specification
Notifications API
# dom-notification-badge

Compatibilité des navigateurs

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
badge

Legend

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

Full support
Full support
No support
No support
See implementation notes.