Navigator: clearAppBadge() メソッド
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Navigator
インターフェイスの clearAppBadge()
メソッドは、現在のアプリケーションのアイコンに設定されているバッジを nothing
に設定し、非表示にします。値 nothing
は現在バッジが設定されていないことを表し、バッジの状態は cleared になります。
構文
js
clearAppBadge()
引数
なし
返値
例外
NotSupportedError
DOMException
-
Navigator
に操作を実行する対象のドキュメントが無いとき投げられます。
例
アプリケーション内の全メッセージが読まれたら、clearAppBadge()
を呼び出してバッジを非表示にし、通知を消去します。
js
navigator.clearAppBadge();
仕様書
Specification |
---|
Badging API # clearappbadge-method |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clearAppBadge |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.