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
Preload script is not loaded for a window created with window.open #16224
Comments
Someone might correct me on this, but I'm pretty sure the "expected behavior" you're describing is actually a bug that has been fixed. |
The documentation says:
So I'm expecting my options to be inherited. If I try to add this code in the example repo: mainWindow.webContents.on('new-window', function (
event, url, frameName, disposition, options, additionalFeatures, referrer
) {
console.log(options);
}) the options contains the correct values which I'm expecting. |
After some try this seems to have regressed between electron 2.0.11 and 2.0.12 |
@MarshallOfSound creating a new BrowserWindow in I think this issue is related to #15109 and #15207 |
Probably also related to #12390 You can try reverting to Electron 3.0.4. Haven't checked yet if this issue is fixed in the latest versions. |
I've checked, it isn't fixed :( |
Doing some more testing, it looks like any version released after 3.0.5 on 2018-10-19 has this issue, while versions released prior to that work fine |
@MarshallOfSound I tryed again with electron 2.0.17 and 3.0.15 and still nothing.
and on the devtools the message seems to have some extra newlines
|
Tried on v5.0.0-beta.5 with the same result. |
I'm experiencing this issue on 4.1.4 on macOS Mojave. |
@MarshallOfSound @zcbenz @miniak |
Thank you for taking the time to report this issue and helping to make Electron better. The version of Electron you reported this on has been superseded by newer releases. If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know. I'm setting the Thanks in advance! Your help is appreciated. |
Same issue and same workaround with electron 8.0.1 |
The Electron version reported on this issue is no longer supported. See our supported versions documentation. If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know. Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated. |
With version 12.0.1 I needed to add |
@electron-triage , how hard is it to make better documentation that actually can render a solution ? I have been all over this document , tried every single thing it is suggesting with no avail, it is a total contraction of itself. |
I ended up using
Also you can read more on this approach here |
node_modules/.bin/electron --version
: v4.0.0node_modules/.bin/electron --version
on last known working Electron version (if applicable): 1.8.8Started to fail since 2.x versions.
Expected Behavior
Preload script should be loaded also for a window created with
window.open
andnativeWindowOpen: true, nodeIntegration: false
I don't see any warning about nodeIntegration.
Actual behavior
Preload script is not loaded.
I also see a warning about nodeIntegration enabled.
To Reproduce
Try again with electron@1.8.8
Screenshots
N/A
Additional Information
N/A
The text was updated successfully, but these errors were encountered: