periodicSync needs "periodic-background-sync" permission
#33.692 geöffnet am 21. Mai 2024
Repository-Metriken
- Stars
- (8.900 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 7T 3h) (147 gemergte PRs in 30 T)
Beschreibung
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/PeriodicSyncManager/register
What specific section or headline is this issue about?
Exceptions
What information was incorrect, unhelpful, or incomplete?
In chromium browsers, this feature also requires the "periodic-background-sync" permission, which throws an error if not obtained: "Permission denied. "
This permission is not available through code, and will only be granted if the user installs the website (with PWA enabled) on their computer.
I haven't tested it in other browsers, at least in edge and Chrome.
What did you expect to see?
I would like to add a description of the error to the error list.
Do you have any supporting links, references, or citations?
https://developer.chrome.com/docs/capabilities/periodic-background-sync#try_it
Google has mentioned here that the feature is available only after installing the app.
You can determine if you have permissions using this code: navigator.permissions.query({ name: 'periodic-background-sync' }).
Do you have anything more you want to share?
No response
MDN metadata
- Folder:
en-us/web/api/serviceworkerregistration/periodicsync - MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/periodicSync
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/serviceworkerregistration/periodicsync/index.md
- Last commit: https://github.com/mdn/content/commit/b74d47ab6e99d2bd43ef9638367d9c69fca04402
- Document last modified: 2024-04-15T05:04:07.000Z