9 lines
338 B
JavaScript
9 lines
338 B
JavaScript
|
const { ipcRenderer } = require('electron')
|
||
|
|
||
|
const syncMsgBtn = document.getElementById('sync-msg')
|
||
|
|
||
|
syncMsgBtn.addEventListener('click', () => {
|
||
|
const reply = ipcRenderer.sendSync('synchronous-message', 'ping')
|
||
|
const message = `Synchronous message reply: ${reply}`
|
||
|
document.getElementById('sync-reply').innerHTML = message
|
||
|
})
|