24c9cbcc0a
docs: handle opening links in the default browser in the main process
14 lines
444 B
JavaScript
14 lines
444 B
JavaScript
const { ipcRenderer } = require('electron')
|
|
|
|
const informationBtn = document.getElementById('information-dialog')
|
|
|
|
informationBtn.addEventListener('click', event => {
|
|
ipcRenderer.send('open-information-dialog')
|
|
})
|
|
|
|
ipcRenderer.on('information-dialog-selection', (event, index) => {
|
|
let message = 'You selected '
|
|
if (index === 0) message += 'yes.'
|
|
else message += 'no.'
|
|
document.getElementById('info-selection').innerHTML = message
|
|
})
|