EN
JavaScript - list of all navigator permissions names
2 answers
3 points
Where can I find the list of all navigator.permissions
names?
I need all the names like geolocation
for query()
method, for example:
xxxxxxxxxx
1
navigator.permissions
2
.query({
3
name: 'geolocation'
4
})
5
.then((result) => {
6
// do something...
7
});
2 answers
6 points
In TypeScript, web browser permissions are defined using:
xxxxxxxxxx
1
type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
Web browsers' specific permissions are defined here:
0 commentsShow commentsAdd comment
3 points
Quick solution:
Note from the documentation:
Each browser supports a different set of values. You'll find Firefox values there, Chromium values there, and WebKit values there.
References
0 commentsAdd comment