24c9cbcc0a
docs: handle opening links in the default browser in the main process
11 lines
342 B
JavaScript
11 lines
342 B
JavaScript
const { ipcRenderer } = require('electron')
|
|
|
|
const selectDirBtn = document.getElementById('select-directory')
|
|
|
|
selectDirBtn.addEventListener('click', event => {
|
|
ipcRenderer.send('open-file-dialog')
|
|
})
|
|
|
|
ipcRenderer.on('selected-directory', (event, path) => {
|
|
document.getElementById('selected-file').innerHTML = `You selected: ${path}`
|
|
})
|