nextron
nextron copied to clipboard
How to show a window from a page by use ipcRenderer?
When I implement, I got the errors like this:
If you comment line 29, does the error happen? It seem to come from elsewhere
@letruonglamit I tried to recreate your error using the Material UI template but it works fine for me. Make sure nodeIntergration: true, contextIsolation: false, and if all that fails, try window.electron.ipcRenderer.send("sss").
@letruonglamit, you should load it dynamically.
Something like this:
let ipcRenderer
if(typeof window !== "undefined" && window.process && window.process.type === "renderer"){
ipcRenderer = window.require('electron').ipcRenderer
console.log("DEBUG: ipcRenderer", ipcRenderer)
ipcRenderer.send("sss")
}
Will close this issue :), feel free to reopen it if you have other issues.