mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
23 lines
517 B
HTML
23 lines
517 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
</head>
|
|
<body>
|
|
<script>
|
|
window.onload = function() {
|
|
function failureCallback() {
|
|
document.getElementById("msg").textContent = "Failure.";
|
|
}
|
|
|
|
function successCallback() {
|
|
document.getElementById("msg").textContent = "Success.";
|
|
}
|
|
|
|
navigator.geolocation.getCurrentPosition(successCallback, failureCallback);
|
|
};
|
|
</script>
|
|
<p id="msg">Webapp waiting for geolocation...</p>
|
|
</body>
|
|
</html>
|