In your standard desktop browser like Safari or Chrome, when you navigate to a site such as maps.google.com and click on the 'my location' button, a message appears asking you if you'd like to give permission to the website to use your GPS/wifi triangulation position.
My question is, how do you detect such an event and show a dialog to a user when using a standard Cocoa (desktop) WebView object? I've tried implementing all of the various delegate methods and none of them seem to catch this javascript event.
navigator.geolocation.getCurrentPosition(function(position) {
do_something(position.coords.latitude, position.coords.longitude);
});
It just fails silently. How do I ask the user for location sharing permission?