(NOTE: This version is a snapshot of the next major version 0.13 which is under active development. For now it’s not compatible with some of the APIs in 0.12, as we are refactoring them with a new technology from upstream. In the final release of 0.13, it will be compatible with all features in 0.12. It’s recommended for you to try this release and give your valuable feedback.)
Hello,
We are pleased to announce the first alpha version of NW.js 0.13.0, which is the next generation version of NW.js platform. New technology from Chromium upstream is used to provide new features, and help us refactoring current ‘nw.gui’ library implementation and increase the efficiency.
More chrome.* API and features
=========================
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.js 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.js 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 section below for a list of APIs we have ported so far. We’ll port more APIs in the following frequent releases. In the final release of 0.13, all the APIs will be ported.
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.js. We support the “app window” instead.
NW.js 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 ( https://github.com/nwjs/nw.js/wiki/Protect-JavaScript-source-code-with-v8-snapshot#compilation)
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 https://github.com/nwjs/nw.js/wiki/How-to-package-and-distribute-your-apps
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.js supports 2 kinds of applications now: Chrome Apps and NW.js Apps. The one with a ‘manifest.json’ file is a Chrome App (with an exception below), while NW.js App is the one with ‘package.json’. They run in different security model: Chrome Apps run in the same model from Chromium upstream; NW.js App runs in the native “Node” security model provided by NW.js platfrom. Apps that has “node” permission in ‘manifest.json’ is a NW.js App.
The native security model trys 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 https://github.com/nwjs/nw.js/wiki/Security .
0.12 APIs ported so far
==================
See
https://github.com/nwjs/nw.js/blob/nw13/src/api/nw_app.idl
https://github.com/nwjs/nw.js/blob/nw13/src/api/nw_window.idl
Download
========
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-v0.13.0-alpha0-win-x64.zip
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-v0.13.0-alpha0-osx-x64.zip
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-v0.13.0-alpha0-linux-x64.tar.gz
SDK build:
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-sdk-v0.13.0-alpha0-win-x64.zip
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-sdk-v0.13.0-alpha0-osx-x64.zip
http://dl.nwjs.io/v0.13.0/alpha0/nwjs-sdk-v0.13.0-alpha0-linux-x64.tar.gz
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 package will also have more development tools to be exposed in the following releases.
Our build infrastructure enables live binary build from git tip so you can access to the latest binary for this branch from http://dl.nwjs.io/live-build/nw13/
Known issues
===========
* (windows) need to specify full path to the package directory as the command line argument
* (osx) app doesn’t quit by closing windows after using devtools
As this is the first alpha release in the early phase of active development. Please expect bugs, and welcome to report them to our issue tracker with ‘[nw13]’ in the title.
Thanks & Best regards,
Roger & Kevin
Unchecked runtime.lastError while running webRequestInternal.addEventListener: You need to request host permissions in the manifest file in order to be notified about requests from the webRequest API.reportIfUnchecked @ extensions::lastError:133handleResponse @ extensions::sendRequest:78
--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roger, is there be in new version some API to control iframe url loading (like progreess - to create prgressbar) and loacation change events or similar? I'm building custom browser with own tabs system and it need a lot of code to control browser url value and tabs urls.
--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello,
How did you package your app? There is a known issue section for this in the release notes.
And in this version we'll change the architecture a little bit so we're in the middle of migrating features from nw12 with alpha versions.
Roger
--
I can't get it to package correctly, thus I can't get it work.Only way I could get it working if I put my all files in the same directory, but that means change of some urls and it looks messy, can you help me do it properly?My current folder is:corenwjspackage.jsonnw.exe shortcut to nwjs foldernw.exe shorcut has "nw.exe ../package.json" parameterin package.json "main": "app://host/core/index.html",launching from nw.exe shortcut won't start it, I'll have to terminate the process through task manager.
whatever.print({
silent: true, //if false shows print preview
printer: "Printer name",
copies:2,
media: "a5",
margin:[0.5,0.5,0.5,0.5]
//etc..
});
var spawn = nw.require('child_process').spawn,
pr = spawn('whatever');
/*...*/
pr.stdin.setEncoding = 'utf-8';
pr.stdin.write("some text\n");
pr.stdin.end(); // got error node.js:545 Uncaught Error {message: "Implement me. Unknown stream file type!"}