periodicSync needs "periodic-background-sync" permission #33692
Labels
Content:WebAPI
Web API docs
help wanted
If you know something about this topic, we would love your help!
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
Page report details
en-us/web/api/serviceworkerregistration/periodicsync
The text was updated successfully, but these errors were encountered: