-6

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

Vishnu V
  • 402
  • 5
  • 13

1 Answers1

1

    navigator.permissions.query({name: 'geolocation'}).then(function(status) {
      console.log(status);
    });
Kaushik
  • 2,024
  • 1
  • 21
  • 29
ACD
  • 1,368
  • 1
  • 6
  • 18