I modified missed parameter in example.
Below example (in line 43 ~ 45) not working like comment. Because `ipcRenderer` callback function have two parameters (event, arg). ```javascript ipcRenderer.on('asynchronous-reply', (arg) => { console.log(arg) // "pong" 출력 }) ```
This commit is contained in:
parent
d6e3360aef
commit
8918770892
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ ipcMain.on('synchronous-message', (event, arg) => {
|
|||
const {ipcRenderer} = require('electron')
|
||||
console.log(ipc.sendSync('synchronous-message', 'ping')) // "pong" 출력
|
||||
|
||||
ipcRenderer.on('asynchronous-reply', (arg) => {
|
||||
ipcRenderer.on('asynchronous-reply', (event, arg) => {
|
||||
console.log(arg) // "pong" 출력
|
||||
})
|
||||
ipcRenderer.send('asynchronous-message', 'ping')
|
||||
|
|
Loading…
Reference in a new issue