mdn/content

periodicSync needs "periodic-background-sync" permission

Open

#33.692 geöffnet am 21. Mai 2024

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Markdown (22.427 Forks)batch import
Content:WebAPIhelp wanted

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

Contributor Guide