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

window.opener is not fully supported by Electron #38

Open
xzycn opened this issue Dec 20, 2017 · 14 comments
Open

window.opener is not fully supported by Electron #38

xzycn opened this issue Dec 20, 2017 · 14 comments

Comments

@xzycn
Copy link

xzycn commented Dec 20, 2017

Hi, do you have meet this problem?
Just as MarshallOfSound said:

window.opener support doesn't quite work in Electron primarily due to our process model, this may change at some point in the future.

The underlying issue confused me very much :(

@xzycn
Copy link
Author

xzycn commented Dec 20, 2017

I have tested with lumi-browser in some situations,trouble with the same issue. :( :(

@qazbnm456
Copy link
Member

Yes, I've been suffering the pain of window.opener related bugs for a really long time. Hope they will fix the issue soon. 😞

@qazbnm456 qazbnm456 changed the title Hi @qazbnm456,do you have meet this problem? window.opener is not fully supported by Electron Dec 20, 2017
@xzycn
Copy link
Author

xzycn commented Dec 20, 2017

@qazbnm456 I have to stop my project that has cast my a lot time, it's a disaster :(
Maybe we can try nwjs?But,almost all things we have done before need to be redone.

@qazbnm456
Copy link
Member

For some personal preferences, I'll still stick to Electron instead of NW.js actually. Maybe you can give it a try, but lots of things indeed need to be reimplemented. 😕

@xzycn
Copy link
Author

xzycn commented May 3, 2018

@qazbnm456 Hi, Electron 2.0.0 has been released yesterday :), but the issue still :(
Do you find a way out now?

@qazbnm456
Copy link
Member

qazbnm456 commented May 3, 2018

Nop, I think the issues will only be resolved when the upstream lands patches or something. However, the progress is slow and priority is not that high currently. 😭

By the way, do you have a minimal repro that can directly test this issue? Maybe I can try to figure out some workarounds in months.

@xzycn
Copy link
Author

xzycn commented May 3, 2018

@qazbnm456 Hi, sorry for my delaying reply.I created a gist for a minimal repro, you could check it in your free time :)
Note: You should check the window.opener in console within new window.

@qazbnm456
Copy link
Member

@xzycn Thanks! I'll notify you once I get some time and make some progress.

@xzycn
Copy link
Author

xzycn commented May 4, 2018

@qazbnm456 Hi, I have made some changes that make it more reasonable in the gist.
However, there is a weird thing: the param webPreferences .nativeWindowOpen is noneffective when mainWindow initial.But putting it in inline of webview tag is effective.like this:
<webview src="wv.html" webpreferences="nativeWindowOpen=yes" allowpopups></webview>

@qazbnm456
Copy link
Member

Thanks for the heads up. I think the rationale of the problem you mentioned is that you try to load the vw.html file within a WebView, but it doesn't inherit the nativeWindowOpen option from the parent BrowserWindow. Therefore, setting the option directly onto the webview tag is needed.

@xzycn
Copy link
Author

xzycn commented May 9, 2018

@qazbnm456 do you have met the problem that downloading a truncated file like a csv file with a 4kb size?:(

@qazbnm456
Copy link
Member

@xzycn Is that another problem? Could you please open another issue that addresses and describes the details of the problem? Thanks!

@xzycn
Copy link
Author

xzycn commented May 9, 2018

@qazbnm456 sorry for my hehavior, it actually is a problem i met in my project not in lulumi ORZ.

@xzycn
Copy link
Author

xzycn commented May 17, 2018

@qazbnm456 Hi,my friend.I got a solution, it's a fork of electron ,maybe you could try,it has a feature:

scriptable window.opener support

:) enjoy.

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

No branches or pull requests

2 participants