Verions tested 0.13.4 sdk x64 and 0.14 sdk x 64
OS: Win7
Getting the "ReferenceError: nw is not defined" after changing windows location. The strange thing is that in main.html the win variable is properly initialized with the nw.Window.

main.html:
<!DOCTYPE html>
<html>
<head>
<script>
win.window.location.assign('http://github.com');
</script>
</head>
<body>
</body>
</html>
package.json:
{
"name": "h2",
"version": "0.0.1",
"private": true,
"main": "main.html",
"window": {
"show": true
},
"inject_js_start":"./lib/winsave.js"
}
./lib/winsave.js
var win = nw.Window.get();
console.log('test');
the winsave.js script stops working
@angufix Add "node-remote" : "<all_urls>" in your package.json. Check this out for possible node-remote values.
@RohitSharma27 thx,it works!
Most helpful comment
@angufix Add
"node-remote" : "<all_urls>"in yourpackage.json. Check this out for possible node-remote values.