docs: enable contextIsolation in fiddles (#39613)
This commit is contained in:
parent
2e79f34c84
commit
9280b79112
61 changed files with 206 additions and 233 deletions
|
@ -1,11 +1,6 @@
|
|||
const { ipcRenderer } = require('electron/renderer')
|
||||
|
||||
const selectDirBtn = document.getElementById('select-directory')
|
||||
|
||||
selectDirBtn.addEventListener('click', event => {
|
||||
ipcRenderer.send('open-file-dialog')
|
||||
})
|
||||
|
||||
ipcRenderer.on('selected-directory', (event, path) => {
|
||||
selectDirBtn.addEventListener('click', async () => {
|
||||
const path = await window.electronAPI.openFileDialog()
|
||||
document.getElementById('selected-file').innerHTML = `You selected: ${path}`
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue