setAppBadge() method of the
Navigator interface a badge on the icon associated with this app. If a value is passed to the method, this will be set as the value of the badge. Otherwise the badge will display as a dot, or other indicator as defined by the platform.
let promise = Navigator.setAppBadge(contents);
numberwhich will be used as the value of the badge. If
0then the badge will be set to
nothing, indicating a cleared badge.
Navigatordoes not have a document that this action can be acted on.
In the example below an unread count is passed to
setAppBadge(). The badge should then display
const unread = 30; navigator.setAppBadge(unread);
The definition of 'setAppBadge' in that specification.
BCD tables only load in the browser