Skip to content

Notification permission requirement #110

Description

@mkruisselbrink

In step 4.2 of the setting the application badge algorithm, it is written that if a user agent requires express permission (and notifications permission hasn't been granted), they should jected with a NotAllowedError. As far as I know this isn't implemented by at least the one user agent I'm aware of that has this permission requirement (i.e. webkit), as both Navigator.setAppBadge and the equivelent WorkerNavigator code unconditionally resolve the returned promise with undefined.

But without that promise rejection, I'm not sure how websites are supposed to determine if they are required to request notifications permission in order to use app badging. Are we expecting site authors to do user agent sniffing (and try to come up with a complete list of user agents that have this requirement)?
Should there perhaps be a separate "is notifications permission required for app badging" API?
And if there are no user agents that actually implement step 4.2, should the step even exist in the algorithm?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TPAC2025Topics for discussion at TPAC 2025

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions