0

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.

Slbox
  • 10,957
  • 15
  • 54
  • 106

1 Answers1

0

Put nodeIntegration: true contextIsolation: false in webPreferences of mainWindow. May be this can be the problem.

Thearcane
  • 59
  • 8
  • Thanks for your reply but this is poor security practice and won't help here regardless. – Slbox Jun 20 '22 at 19:59