-
Notifications
You must be signed in to change notification settings - Fork 17.1k
[Bug]: nodeIntegration cannot be disabled via window.open() with nativeWindowOpen #31949
Copy link
Copy link
Closed
Labels
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
16.0.1
What operating system are you using?
macOS
Operating System Version
macOS Catalina 10.15.7
What arch are you using?
x64
Last Known Working Electron version
N/A
Expected Behavior
I have a BrowserWindow with nativeWindowOpen enabled and nodeIntegration enabled. I want to open a popup using window.open('popup.html', '', 'nodeIntegration=no');, to have nodeIntegration disabled. This is documented here:
electron/docs/api/window-open.md
Lines 45 to 47 in 0865267
| A subset of `WebPreferences` can be set directly, | |
| unnested, from the features string: `zoomFactor`, `nodeIntegration`, `preload`, | |
| `javascript`, `contextIsolation`, and `webviewTag`. |
Actual Behavior
The popup window has nodeIntegration enabled incorrectly. However, when the parent window has nativeWindowOpen disabled, it works.
Testcase Gist URL
No response
Additional Information
native-window-open-node-integration.zip
Test passed: Electron exited with code 0.
Test failed: Electron exited with code 1.
This issue is blocking #29405
Reactions are currently unavailable