question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nw.Window.open callback returns undefined object when using new_instance

See original GitHub issue

In nwjs 0.13-beta6, win64 SDK build, when opening a new window with “new_instance” set to true, the Window.open callback returns an undefined object. Even the ‘this’ object is undefined.

nw.Window.open('new.html', {
   'new_instance': true
},function(win){
   // win is undefined here
});

Edit: Unless this is by design because the new window will have a new context that we are not supposed to access?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:54 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Jan 4, 2019

Thank you Roger for this project. You are enabling many people to create the future!

3reactions
rogerwangcommented, Jan 4, 2019

0.35.4 was just released with a testing version of #5875. This issue is fixed under it. Please see more information in that issue. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is a new instance of a object undefined? - Stack Overflow
I am unable to use the same instance of an object in another java-script file using nodejs. I'm working on a bot for...
Read more >
Why “this” gets undefined inside a function - Dev Genius
Before getting into the “this” keyword, let's first understand “undefined”. In simple words, if we try to understand, “undefined” is the absence of...
Read more >
What to do when “this” loses context - freeCodeCamp
A way to fix the problem is to create new functions in the constructor using bind(this) . constructor(){ super(); this.todos = []; this....
Read more >
Window - NW.js Documentation
This function returns a Window object via the callback. You can use any properties and methods of Window except the events. See also...
Read more >
this - JavaScript | MDN
If a function is called with this set to undefined or null , this gets ... constructors: the this value is the new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found