electron/spec/fixtures/pages/geolocation/index.html

12 lines
300 B
HTML
Raw Normal View History

<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>