NW.js v0.13.0-beta1 Release Notes

We are delighted to announce NW.js 0.13.0-beta1, the first beta release of the 0.13 version, which is based on an adjusted architecture. It will bring the benefit of enabling most features in the Chromium browser, including Chrome Apps support, chrome.* platform APIs, NaCl and Pepper plugin, builtin PDF viewer, printing preview, rich notifications and many more. We also expect faster release cycle with the new architecture in 2016.

In this version Chromium is updated to 47.0.2526.73 and Node.js is updated to 5.1. We’ll keep updating with the 2 upstreams in the beta cycle.

We also changed the API to put everything from the ‘nw.gui’ library into the ‘nw’ object. To provide API compatibility with 0.12 applications, we evaluate a builtin shim script at window context creation. It simulates the API provided by 'require('nw.gui')'.

Starting from this version, the official documentation is maintained in the same repo we use for development, and is available in http://docs.nwjs.io . Welcome to submit PR for it. Documents for the previous versions will be in the wiki as usual.

There is a new feature “content verification”, or “app signing”, prevents loading unsigned files with your official binary. For more information, see http://docs.nwjs.io/en/latest/For%20Users/Advanced/Content%20Verification/

See what’s changed in the new version and how to migrate your application: http://docs.nwjs.io/en/latest/For%20Users/Migration/From%200.12%20to%200.13/


SDK build:

NaCl build and other platforms: http://dl.nwjs.io/v0.13.0-beta1/

There are 3 builds for each platform - normal build, sdk build and Nacl 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 http://dl.nwjs.io/live-build/

More chrome.* API and features from Chromium browser

In previous 0.12 version we started to support chrome.webRequest API to let you intercept network requests made by DOM. In this version we bring even more of chrome.* API. Including rich notification, context menu, usb, etc.

NW is now able to support rich notifications (aka message center based notifications), with which you can put buttons, lists, images, icon and progress bar in the notification. In this version we also supports print preview and SSL client certificates.

Under the hood for this improvement is the effort made by upstream to move the extension mechanism towards the Content layer, as well as componentizing the browser modules (https://www.chromium.org/developers/design-documents/browser-components). NW will evolve with upstream towards the “app shell” architecture. In future we’ll split the browser components as separate loadable modules so the binary size can be shrunk significantly. The new architecture diagram is posted here: https://github.com/nwjs/nw.js/wiki/NW13-architecture

We are also using it to refactor the implementation of ‘nw.gui’ library in 0.12. The extension mechanism provide a lightweight and elegant solution for JS API binding. With it we are able to eliminate the overhead of additional IPC messages used in previous version.

See the upstream docs for the listing of chrome APIs: https://developer.chrome.com/apps/api_index . Note that APIs related to browser window operation is not supported, because there is no normal Chrome browser window in NW. We support the “app window” instead.

NW developers follows upstream changes closely and bring them to the application developers. Previously in 0.12 we used the new code cache feature in the V8 engine to improve JS source code compilaton ( http://docs.nwjs.io/en/latest/For%20Users/Advanced/Protect%20JavaScript%20Source%20Code/ )

Chrome (Packaged) App support

After supporting many chrome.* APIs, the manifest spec for Chrome Apps are also supported in straightforward way. That means many Chrome Apps can be run directly on NW. Clone the sample apps repository (https://github.com/GoogleChrome/chrome-app-samples) and run one of them with:

$ /path/to/nw.exe <folder path of the manifest.json file>

or drag the folder to the NW executable. CRX packaging for Chrome Apps is not supported but you can use the packaging mechanisms provided by NW. See http://docs.nwjs.io/en/latest/For%20Users/Package%20and%20Distribute/

And of course Node.js APIs can be accessed from Chrome App: add “node” permission to manifest.json and you are ready to call nw.require().

So NW supports 2 kinds of applications now: Chrome Apps and NW Apps. The one with a ‘manifest.json’ file is a Chrome App (with an exception below), while NW App is the one with ‘package.json’. They run in different security model: Chrome Apps run in the same model from Chromium upstream; NW App runs in the native “Node” security model provided by NW platfrom. Apps that has “node” permission in ‘manifest.json’ is a NW App.

The native security model tries to provide you the maximum capability as in a traditional C++ desktop application. You can access all the chrome.* APIs without declaring permission in manifest, load all Node.js libraries and DOM operations are not limited by cross origin checks any more. Untrusted contents are still running in the same security model from Chromium browser. For more information, see http://docs.nwjs.io/en/latest/For%20Users/Advanced/Security%20in%20NW.js/

Known issues



Thanks to the following people for their contributions to the release: