e9a43be9be
* docs: add IPC doc * fix: use "string" primitive * use 'string' ipcrenderer * use "number" primitive * Update docs/tutorial/ipc.md Co-authored-by: Jeremy Rose <nornagon@nornagon.net> * Update docs/tutorial/ipc.md Co-authored-by: Jeremy Rose <nornagon@nornagon.net> * add code sample Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
7 lines
245 B
JavaScript
7 lines
245 B
JavaScript
const btn = document.getElementById('btn')
|
|
const filePathElement = document.getElementById('filePath')
|
|
|
|
btn.addEventListener('click', async () => {
|
|
const filePath = await window.electronAPI.openFile()
|
|
filePathElement.innerText = filePath
|
|
})
|