gecko-dev/dom/tests/browser/browser_geolocation_private...

12 строки
270 B
HTML

<html>
<body>
<script>
navigator.geolocation.getCurrentPosition(function(pos) {
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent('georesult', true, false, pos.coords.latitude);
document.dispatchEvent(evt);
});
</script>
</body>
</html>