[Solved] Is there a way to return true if the user allows location sharing and false if denied? [closed]


    navigator.permissions.query({name: 'geolocation'}).then(function(status) {
      console.log(status);
    });

solved Is there a way to return true if the user allows location sharing and false if denied? [closed]