Firefox Tomorrow

web api instance method

WorkerNavigator: clearAppBadge() method

View on MDN ↗

Secure context

The clearAppBadge() method of the WorkerNavigator interface clears a badge on the current app’s icon by setting it to nothing. The value nothing indicates that no badge is currently set, and the status of the badge is cleared.

Syntax

clearAppBadge()

Parameters

None.

Return value

A Promise that resolves with undefined.

Exceptions

Examples

Once all messages in an application have been read, call clearAppBadge() to clear the badge and remove the notification.

navigator.clearAppBadge();

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also