bce5bd87a8
* fix: opt into location services once device service has been started * refactor: provide fake location provider to mock geolocation reponses * chore: add spec for navigator.geolocation api using fake location provider
12 lines
No EOL
300 B
HTML
12 lines
No EOL
300 B
HTML
<script>
|
|
const ipcRenderer = require('electron').ipcRenderer;
|
|
navigator.geolocation.getCurrentPosition((position) => {
|
|
ipcRenderer.send(position);
|
|
}, (error) => {
|
|
if (error) {
|
|
ipcRenderer.send('success')
|
|
} else {
|
|
ipcRenderer.send('unexpected error')
|
|
}
|
|
})
|
|
</script> |