global
, которая находится в контексте Node.js, а не window
.In node-webkit, you can basically do the same thing by usingwindow.location
, you can install it in theonclick
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 inwindow
context, you can save everything in cookies like old web pages, or you can save things in theglobal
variable, which resides in Node.js's context and will live through your app.