Answers for "permission api query js"

1

permission api query js

navigator.permissions.query({name:'geolocation'}).then(function(result) {
 if (result.state == 'granted') {
   showLocalNewsWithGeolocation();
 } else if (result.state == 'prompt') {
   showButtonToEnableLocalNews();
 }
 // Don't do anything if the permission was denied.
});
//name: camera
//name: microphone
Posted by: Guest on June-17-2020
1

permission api query js

navigator.permissions.query({name:'geolocation'}).then(function(result) {
 if (result.state == 'granted') {
   showLocalNewsWithGeolocation();
 } else if (result.state == 'prompt') {
   showButtonToEnableLocalNews();
 }
 // Don't do anything if the permission was denied.
});
//name: camera
//name: microphone
Posted by: Guest on June-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language