-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron.ipcRenderer.on is undefined #49
Comments
After I investigated it for awile, I think this is caused by const mainWindow = new BrowserWindow({
height: 600,
width: 800,
webPreferences: {
preload: __preloads.index,
contextIsolation: true, // change this to false to make "ipcRenderer.on" accessable!
nodeIntegration: false
}
}) So the workaround is changing it to false... Not sure if this is by-design for electron. |
Thank you very much! |
Thanks to raise the issue, and I fix this by adding a wrapper in In 0.0.11, it will ship with the following wrapper (and this is easy to remove):
|
I made the following choice, and then without changing a single line of code, after starting
ipcRenderer
could not accesson
It looks like the event-related code is not appended
system info
versions: 1.55.0-insider (system setup)
commit: d06d2f1d6245ce00b1c36a9cd81a9087d225173e
date: 2021-03-26T14:01:14.867Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042
The text was updated successfully, but these errors were encountered: