Skip to content
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

remote.getCurrentWindow returns incomplete window object #132

Open
Nantris opened this issue Jun 16, 2022 · 3 comments
Open

remote.getCurrentWindow returns incomplete window object #132

Nantris opened this issue Jun 16, 2022 · 3 comments

Comments

@Nantris
Copy link

Nantris commented Jun 16, 2022

Is this an inherent limitation? A design choice?

image

Through this we cannot access anything, like for instance to see if the window is set to remain alwaysOnTop.

@Nantris
Copy link
Author

Nantris commented Jul 9, 2022

Thanks for your reply, but that's what we're already doing, and it does not work as remote used to work. Almost every property is missing. Where's alwaysOnTop? Where's everything else besides these five properties?

  • devToolsWebContents
  • name
  • setBounds
  • _events
  • _eventsCount

@MarshallOfSound
Copy link
Member

MarshallOfSound commented Jul 9, 2022

remote works via custom getters and setters. The contextBridge API that is exposed to users does not support getters and setters.

Ref: https://github.com/electron/electron/blob/main/shell/renderer/api/electron_api_context_bridge.cc#L482-L487
Ref: https://github.com/electron/electron/blob/main/shell/renderer/api/electron_api_context_bridge.cc#L591-L592

@Nantris
Copy link
Author

Nantris commented Jul 9, 2022

Very appreciative for the reply @MarshallOfSound. Bummer to not have access to all the old features of remote for debugging though; it made life so much easier when debugging certain issues.

I can't test this currently, but I don't suppose that we could transmit the entire BrowserWindow across contextBridge either, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants