Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
Ask for Geolocation Permission without checking position

I know how to get user's position with JavaScript. I also know how to check if permission has been granted or not:

(async () => {
    const permission = await navigator.permissions.query({
        name: 'geolocation',
    });

    console.log(permission.state);

    permission.addEventListener(
        'change',
        event => console.log(event.target.state)
    );
})();

But is it possible to ask for permission without getting location? Sure, I can just call navigator.geolocation.getCurrentPosition(success) and dismiss it, but is there an explicit way to only ask for permission?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!