jukirchn / electron-projects

Example projects from the book "Electron Projects" (Denys Vulka)
0 stars 0 forks source link

Markdown-editor: event is not displayed in print message #1

Closed jukirchn closed 2 years ago

jukirchn commented 2 years ago

Calling

ipcMain.on('editor-reply', (event, arg) => {
    console.log('Received reply from web page: ${arg}');
});

prints Received reply from web page: ${arg} in the terminal.

Should print: Received reply from web page: hello world

jukirchn commented 2 years ago

Same issue when loading webpage. Should return Received reply from web page: Page Loaded in that case.

jukirchn commented 2 years ago

Solved by restructuring the string:

ipcMain.on('editor-reply', (event, arg) => {
    console.log('Received reply from web page: ' + arg);
});