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

callback Nw.Win.open return null #4788

Closed
osan15 opened this issue Apr 28, 2016 · 15 comments
Closed

callback Nw.Win.open return null #4788

osan15 opened this issue Apr 28, 2016 · 15 comments

Comments

@osan15
Copy link

osan15 commented Apr 28, 2016

Hi,

When I do nw.Window.open with an external URL like below, the callback parameter is "undefined" but Window opens.

nw.Window.open('https://github.com', {}, function(new_win) {
   //new_win => undefined
});

Is that normal ?

I use NWJS v14.2 with Windows 7

Thank you in advance for your help

@rogerwang
Copy link
Member

Could you please try again with the nightly build? : http://dl.nwjs.io/live-build/04-29-2016/nw14-6a70963-b0cc05f-3d8c7fc-24751d8

@osan15
Copy link
Author

osan15 commented Apr 29, 2016

It is still not working, half the time

@osan15
Copy link
Author

osan15 commented Apr 29, 2016

The call Stack associated with debugger in callback :

(anonymous function) (VM24861:2)
(anonymous function) (extensions::nw.Window:648)
(anonymous function) (extensions::app.window:137)
safeCallbackApply (extensions::sendRequest:21)
handleResponse (extensions::sendRequest:64)

@rogerwang
Copy link
Member

Could you please provide a full sample which reproduce the issue?

@osan15
Copy link
Author

osan15 commented Apr 29, 2016

errors_sample

Its is random way

@AndryBray
Copy link

Old issue (just for reference)
#4188

@AndryBray
Copy link

Hi @rogerwang
could you please tell us what the priority of this issue is?
This is a blocking bug for who need to listen for events soon after the new window opening...
I hope you could fix it asap.

Thank you

@rogerwang
Copy link
Member

It's very high priority. The problem is I cannot reproduce it. I'll try
again with this sample.

On Tue, May 3, 2016, 2:30 AM AndryBray notifications@github.com wrote:

Hi @rogerwang https://github.com/rogerwang
could you please tell us what the priority of this issue is?
This is a blocking bug for who need to listen for events soon after the
new window opening...
I hope you could fix it asap.

Thank you


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#4788 (comment)

@frankhale
Copy link
Contributor

frankhale commented May 2, 2016

I just tested on 0.15 beta1 x64 on Windows 10 and it's pretty easy to reproduce the issue. Here is a screenshot:

nw-new-window-issue

@rogerwang
Copy link
Member

I see. It's easy to reproduce with devtools opening. Previously I was testing it with an automated case.
Will fix it today. Thanks.

@rogerwang
Copy link
Member

@osan15
Copy link
Author

osan15 commented May 3, 2016

I tested and it seems that the window is defined all of the time.
But i found another problem, its impossible to catch Window event like document-start,document-end,loaded.

An example :

var win; nw.Window.open('https://google.fr', {}, function(new_win) { console.log("This WIN : ", new_win); new_win.on("loaded", function() { console.log("windows loaded"); }) new_win.on("document-start",function(){ console.log("document loaded"); }) new_win.on("document-end",function(){ console.log("document-end"); }) win = new_win; });

@rogerwang
Copy link
Member

The callback fires in the same time with 'document-start'. I'll check the other events.

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@rogerwang
Copy link
Member

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

4 participants