In our Electron app, we’ve disabled node integration in our main
BrowserWindow by adding
'node-integration': false to the object we pass to the
In certain circumstances, when the web page code within our app calls
window.open, we’d like to allow new windows to be opened. However, we need node integration to be disabled for these new windows as well.
Is it possible to disable node integration for new windows opened in this fashion? It seems not, as node integration is enabled by default and there seems to be no way to control the options that are passed to the new
I’m aware of the
'new-window' event documented here: http://electron.atom.io/docs/v0.27.0/api/browser-window/, and I understand that we can prevent new windows from being opened by calling
preventDefault on the argument event. However, there seems to be no way to access or modify the new
BrowserWindow that would be created from inside a
'new-window' event handler.