[Webkit-unassigned] [Bug 254884] setAppBadge() with no or '0' as argument should show badge

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 4 00:01:30 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=254884

--- Comment #3 from ik at rejh.nl ---
Thanks for looking into this.

I agree that MDN is wrong, there is a difference between passing '0' ("nothing') or no argument ("flag") to setAppBadge.

The spec:
https://w3c.github.io/badging/#setting-the-application-badge
https://w3c.github.io/badging/#dfn-flag

- Calling setAppBadge(0) (the value "nothing") should remove the badge. WebKit does this correctly, MDN is wrong.

- Calling setAppBadge() (the value "flag") should display a badge without a number. WebKit incorrectly removes the badge.

I do agree that iOS not supporting "flag" badges presents a problem here, but I'm not sure that removing the badge is the right solution? Maybe showing '1' is more appropriate?

I'd rather have WebKit handle this because the alternative is that websites need to call setAppBadge() or setAppBadge(1) depending on browser detection (which is undesirable).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230404/fd532be0/attachment.htm>


More information about the webkit-unassigned mailing list