Closed dotherightthing closed 1 year ago
... { label: appName, submenu: [ { label: 'Load images', click: () => { mainWindow.webContents.executeJavaScript('uiSelectFolder()'); } } ] } ]; Menu.setApplicationMenu(Menu.buildFromTemplate(template));
This appears to be a bug introduced by refactoring - a clash between CommonJS and ESM.
The main thread needs to call a method in the renderer. This currently done with executeJavaScript.
executeJavaScript
But the renderer uses ESM so cannot expose its methods to the main thread.
This appears to be a bug introduced by refactoring - a clash between CommonJS and ESM.
The main thread needs to call a method in the renderer. This currently done with
executeJavaScript
.But the renderer uses ESM so cannot expose its methods to the main thread.