0fe718b1d9
* docs: add Synchronous Messages Fiddle example * Code review changes * Add OS support info
9 lines
No EOL
338 B
JavaScript
9 lines
No EOL
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
|
|
}) |