Уже сам нашел ответ в документации на node-webkit.
Есть переменная
global
, которая находится в контексте Node.js, а не
window
.
In node-webkit, you can basically do the same thing by using window.location
, you can install it in the onclick
event of a link and node-webkit will navigate to a new page when user clicks it. But by doing this you would lose everything in window
context, you can save everything in cookies like old web pages, or you can save things in the global
variable, which resides in Node.js's context and will live through your app.