var childWindow;
nw.Window.open('
https://github.com/', {
'inject_js_end': './script.js' }, function (githubWindow) {
githubWindow.on('loaded', function () {
childWindow = githubWindow.window;
childWindow.parentWindow = window;
});
});
now, in the main window you can access the child window, its variables and functions you can even call them.
In the child window you can access the parent window;