files/en-us/web/api/navigator/clearappbadge/index.md
{{APIRef("Badging API")}}{{securecontext_header}}
The clearAppBadge() method of the {{domxref("Navigator")}} 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.
clearAppBadge()
None.
A {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.
InvalidStateError {{domxref("DOMException")}}
SecurityError {{domxref("DOMException")}}
NotAllowedError {{domxref("DOMException")}}
granted.Once all messages in an application have been read, call clearAppBadge() to clear the badge and remove the notification.
navigator.clearAppBadge();
{{Specifications}}
{{Compat}}