electron/spec/fixtures/pages/geolocation/index.html
Robo bce5bd87a8 fix: opt into location services once device service has been started (#14253)
* 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
2018-08-23 08:51:46 -07:00

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>