mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
30 lines
715 B
HTML
30 lines
715 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<script type="text/javascript">
|
||
|
var result = null;
|
||
|
|
||
|
function handlePosition(position) {
|
||
|
result.innerHTML = position.coords.latitude + " " + position.coords.longitude;
|
||
|
}
|
||
|
|
||
|
function handleError(error) {
|
||
|
result.innerHTML = error.message;
|
||
|
}
|
||
|
|
||
|
function init() {
|
||
|
result = document.getElementById("result");
|
||
|
|
||
|
if (navigator.geolocation)
|
||
|
navigator.geolocation.getCurrentPosition(handlePosition, handleError,
|
||
|
{enableHighAccuracy: false, timeout: 6000});
|
||
|
else
|
||
|
result.innerHTML = "not available";
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="init()">
|
||
|
<p id="result">undefined</p>
|
||
|
</body>
|
||
|
</html>
|