Wednesday, 21 August 2013

JS callback when ignoring geolocation permission request?

JS callback when ignoring geolocation permission request?

When utilizing JS geolocation on a web page, the browser asks the user if
they want to allow or deny the webpage to access their location.
navigator.geolocation.getCurrentPosition(showPositionFunction,
errorFunction);
The showPositionFunction is what is called if the user grants geolocation
access. errorFunction is called if the user deny's geolocation access or
if the geolocation fails for some reason.
But most browsers also allow you to ignore the geolocation permission
question. For Chrome and Firefox, you can simply hit the X button to close
the permission dialog, neither allowing or denying geolocation access. Is
there a callback for this event?

No comments:

Post a Comment