blob: cd4ee87a489ffc2823b4407c079239c7ed7cf97f [file] [log] [blame]
<html>
<body>
<script>
function successCallback(position) {
var message = {
'success': true,
'message': 'Received cached position lat: ' + position.coords.latitude + ', long: ' + position.coords.longitude
};
parent.postMessage(message, '*');
}
function errorCallback(error) {
var message = {
'success': false,
'message': 'Failed to get position.'
}
parent.postMessage(message, '*');
}
navigator.geolocation.getCurrentPosition(
successCallback,
errorCallback,
{ maximumAge:600000, timeout:0 });
</script>
</body>
</html>