When using @electron/remote
, the results of remote.getCurrentWindow()
lack all the additional properties/methods of the window that are accessible from the main
process, and used to be accessible when using remote.getCurrentWindow()
with the built-in remote
. For example:
@electron/remote
const remote = require('@electron/remote');
console.log(remote.getCurrentWindow().isFullScreen); // undefined
original remote module
const { remote } = require('electron');
console.log(remote.getCurrentWindow().isFullScreen); // true/false
What's the reason for this difference in behavior? It's not documented anywhere that I could find.
Put
nodeIntegration: true
contextIsolation: false
inwebPreferences
of mainWindow. May be this can be the problem.