NW.js v0.19.5 Released with Node.js Support in WebView

95 views
Skip to first unread message

Roger

unread,
Jan 10, 2017, 12:14:09 AM1/10/17
to nwjs-g...@googlegroups.com

NW.js 0.19.5 is released with 2 new features: Node.js Support in WebView; Accessing DOM from VM context of Node.

To enable Node.js support in WebView, add the allownw attribute to the webview tag. Then Node.js will be turned on, no matter it loads local file or remote site. Use this feature with caution because webview is normally supposed to load untrusted contents.

Now you can access DOM from VM context of Node. In other words, the following code should work now. Previously it just crashed:

var vm = require('vm');
var c = new vm.createContext({e: document.body});
var script = new vm.Script('e.style');
script.runInContext(c);

NW19 features Chromium 55, which contains under-the-hood performance and stability tweaks, and some cool new features to explore like input handling improvements. See the upstream announcement for more information. NW19 also features V8 5.5, which ships support for JavaScript's async/await & has 35% less memory consumption on low-memory devices.

For more information on the new milestone 0.13 and later versions, please see our blog "What's New in 0.13" for a better introduction.

ChangeLog

  • Update Node.js to 7.4.0
  • Node.js integration is supported in webview (#4780)
  • Fix: Crash when accessing HTMLElement properties from node's vm module (#4018)
  • Fix: Linux wrong file permissions (#5611)
  • [docs] Node.js support in webview

Full ChangeLog: https://github.com/nwjs/nw.js/blob/nw19/CHANGELOG.md

Download

SDK build:

Binary for other platforms: https://dl.nwjs.io/v0.19.5/

There are 2 builds for each platform - normal build, and SDK build. Normal build doesn't have devtools, only SDK build does. lt can be opened by pressing F12 (Cmd-Alt-I on OSX). SDK packages also have more development tools to be exposed in the following releases, as well as the NaCl support.

Our build infrastructure enables live binary build from git tip so you can access to the latest binary from https://dl.nwjs.io/live-build/

Known issues

http://docs.nwjs.io/en/latest/For%20Users/Migration/From%200.12%20to%200.13/#known-issues

Reply all
Reply to author
Forward
0 new messages