-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope of badging #5
Comments
I believe that's what the TODO in the explainer is proposing as well:
|
Ah, shame cube time - didn't see that previously. Will leave this here in case there's more discussion to be had on the topic. |
Thanks, Rowan. Yep, let's leave this open as it's something we still need to address. Options, as I see it, are:
This ties into the debate about how to uniquely identify a manifest, in w3c/manifest#668 (we need to be able to map a manifest onto a specific instance of an app, which requires some concept of an app "primary identifier"). |
A given domain can have multiple service workers and manifests with different scopes. For example, assume I have a:
/
/my-orders
/deal-of-the-day
Assuming a sync in my service worker like
Which installed manifest would get that badge?
My assumption would be that the badge inherits the scope of whatever's calling it. i.e. if the service worker is at / so both installed apps at the lower scope get the badge.
Could we have an optional
scope
parameter, similar tonavigator.serviceWorker.register()
that would allow setting the badge at a narrower scope? This would allow a top-level service worker to set a badge for a lower level installed app without affecting the other.I think I would also expect any badge set at a higher scope to override any more specific ones.
The text was updated successfully, but these errors were encountered: