-6

I need a javascript function that returns true if the user is sharing the location in the site and return false if not.

1 Answers1

1

    navigator.permissions.query({name: 'geolocation'}).then(function(status) {
      console.log(status);
    });
Kaushik
  • 2,072
  • 1
  • 23
  • 31
ACD
  • 1,431
  • 1
  • 8
  • 24