What type of issue is this?
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
According to the setAppBadge page, Safari offers full support. However, it incorrectly handles no or 0 as an argument.
A number which will be used as the value of the badge. If contents is 0 then a badge not containing a count will be displayed.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/setAppBadge#parameters
Instead, Safari does not show a badge or removes it (if it was set with a number before).
What browsers does this problem apply to, if applicable?
Safari 16.4
What did you expect to see?
Calling setAppBadge() and setAppBadge(0) should show a badge without a number.
Did you test this? If so, how?
Run navigator.setAppBadge() and navigator.setAppBadge(0) via dev tools for any installed web app.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
Intended behavior:
A number which will be used as the value of the badge. If contents is 0 then a badge not containing a count will be displayed.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/setAppBadge#parameters
WebKit bug:
https://bugs.webkit.org/show_bug.cgi?id=254884
Do you have anything more you want to share?
No response
MDN URL
No response
MDN metadata
No response
What type of issue is this?
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
According to the setAppBadge page, Safari offers full support. However, it incorrectly handles no or
0as an argument.Instead, Safari does not show a badge or removes it (if it was set with a number before).
What browsers does this problem apply to, if applicable?
Safari 16.4
What did you expect to see?
Calling
setAppBadge()andsetAppBadge(0)should show a badge without a number.Did you test this? If so, how?
Run
navigator.setAppBadge()andnavigator.setAppBadge(0)via dev tools for any installed web app.Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
Intended behavior:
WebKit bug:
https://bugs.webkit.org/show_bug.cgi?id=254884
Do you have anything more you want to share?
No response
MDN URL
No response
MDN metadata
No response