NW.js v0.13.0-alpha0 is available

7,893 views
Skip to first unread message

Roger Wang

unread,
May 10, 2015, 10:11:29 PM5/10/15
to nwjs-g...@googlegroups.com

(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


Paul Anthony Webb

unread,
May 10, 2015, 11:40:04 PM5/10/15
to nwjs-g...@googlegroups.com
Oh wow, that's great. No need for me to have my custom context menu anymore!

I am curious about this new 0.13 version, sounds like it's gonna be awesome. Roger/Kevin, do you guys have a *rough* timeframe for when it will be available? I'm not in a rush, just curious.

VoidVolker

unread,
May 11, 2015, 8:54:24 AM5/11/15
to nwjs-g...@googlegroups.com
It be more comfortable to switch on permissions for DevTools:

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

And this version is closing when trying to look into chrome object for API research in DevTools.
 

zhuzhe...@gmail.com

unread,
May 11, 2015, 10:11:01 PM5/11/15
to nwjs-g...@googlegroups.com
将来会支持chrome的更多API吗.像chrome extension那样. 比如我想用独立的proxy,但是现在的chrome app是没有这些API的.

在 2015年5月11日星期一 UTC+8上午10:11:29,Roger Wang写道:

Roger Wang

unread,
May 12, 2015, 1:38:18 AM5/12/15
to nwjs-g...@googlegroups.com, zhuzhe...@gmail.com, zhuzhe...@gmail.com
Hello, which API are you referring to?

And please use English only in this mailing list.

Roger

zhuzhe...@gmail.com

unread,
May 12, 2015, 2:31:05 AM5/12/15
to nwjs-g...@googlegroups.com, zhuzhe...@gmail.com
now nw.js in version 0.13.0 has support chrome app api , but i want to use api like chrome extension's ,like proxy:https://developer.chrome.com/extensions/proxy
does nw.js support these api in the future?


在 2015年5月12日星期二 UTC+8下午1:38:18,Roger Wang写道:

Roger Wang

unread,
May 12, 2015, 3:01:41 AM5/12/15
to nwjs-g...@googlegroups.com, zhuzhe...@gmail.com, zhuzhe...@gmail.com
The proxy api will be enabled in the next alpha version.

The webnavigation API depends on Browser UI (tab) which is not in NW.js. We'll see providing a similar API in the next step shortly.

Thanks,

Roger

Kamesh Arumugam

unread,
May 12, 2015, 5:05:10 AM5/12/15
to Roger Wang, nwjs-g...@googlegroups.com, zhuzhe...@gmail.com
First of all, there are lots of chrome app api being supported which is pretty cool. plus Native dictionary and context menu is super awesome . Thanks for that.

But struggling to start nwjs sample project. unable to find require/process or any node properties in context. Am i missing something here.

Attached sample test app and screens.

Environment : 

OSx Mavericks
Thanks.

--
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.



--
Thanks,
Kamesh.
nw13_sample.zip
nw13_require_process.png

Roger

unread,
May 12, 2015, 9:10:05 PM5/12/15
to Kamesh Arumugam, nwjs-g...@googlegroups.com, zhuzhe...@gmail.com
The Node.js symbols is under 'nw' object now: nw.require() etc.

And the independent Node context is the same with the DOM context of the background page. In the following alpha versions, we'll enable a "mixed context“ mode where the Node context is the same with the window DOM context. We just found both of these 2 modes are backed by real requirements, see the discussion here: https://github.com/nwjs/nw.js/issues/3107

Apologies to miss it in the release notes...

Roger

VoidVolker

unread,
May 13, 2015, 4:59:12 PM5/13/15
to nwjs-g...@googlegroups.com
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.

Kamesh Arumugam

unread,
May 14, 2015, 6:47:35 AM5/14/15
to VoidVolker, nwjs-g...@googlegroups.com
@Roger thanks, ah i totally forgot about that nwjs-context change discussion thread :(

@VoidVolker customBrowser build with iframe has only advantage of DOM referencing directly from nwjs rather that part it has main disadavantage of beign singleThreaded. any website which leaks javascript will cripple the entire system

But Webview is really a good substitute in that case. we are also building a product similar to browser.

if it single website/ known website iframe setup would help in controlling the app behaviour but if it third party site then  it would a good idea to with webview. and there are couple events in webview which will indicate about load-start stop progress..


Hope this info helps !!!!!

On Thu, May 14, 2015 at 2:29 AM, VoidVolker <voidv...@gmail.com> wrote:
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.



--
Thanks,
Kamesh.

Boris Dudelsack

unread,
May 14, 2015, 10:42:35 AM5/14/15
to nwjs-g...@googlegroups.com
I definitely need the current IFRAME functionality too. I need the direct access to the iframe's DOM. WebView concept is nice, but it would make a lot of things more complicated for my current app.

zachary...@gmail.com

unread,
May 25, 2015, 3:45:04 PM5/25/15
to nwjs-g...@googlegroups.com
What is the package for distribution process for 0.13?  The Mac and Windows packaging process on the wiki doesn't seem to work for 0.13.  The app files are ignored, and I get the default gray window with the animated nw.js logo.

Thanks!

Roger

unread,
May 25, 2015, 9:13:05 PM5/25/15
to zachary...@gmail.com, nwjs-g...@googlegroups.com
Hi Zachary,

It should be the same. It seems that you hit some bug. Which packaging method are you using?

Roger

nsha...@gmail.com

unread,
May 28, 2015, 11:38:32 AM5/28/15
to nwjs-g...@googlegroups.com
Hi! Just wont work at all with 13.0.a on windows because package.json was not read from archive.
Please, recently fix this version.

In version 12 can not start newest javascript modules that return "module not self-registered error".
Not so good situation, really?

Regards!

Roger

unread,
May 28, 2015, 6:33:17 PM5/28/15
to nsha...@gmail.com, nwjs-g...@googlegroups.com

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


<nsha...@gmail.com>于2015年5月28日周四 下午11:38写道:
--

scott...@gmail.com

unread,
Jun 2, 2015, 2:16:15 PM6/2/15
to nwjs-g...@googlegroups.com
Hi! I'm very excited about these changes. Is there a rough idea as to when there will be a stable version available?

Thanks
- Scott


On Sunday, May 10, 2015 at 9:11:29 PM UTC-5, Roger Wang wrote:

Roger

unread,
Jun 2, 2015, 10:08:14 PM6/2/15
to scott...@gmail.com, nwjs-g...@googlegroups.com
Hi Scott,

We will release it after all nw12 features and APIs are migrated to the new architecture. We don't have any fixed release date yet but we'll release several alpha versions to show the progress and then enter RC to have it well tested. 

We suggest you to try it and report feedback if the APIs you are using have been migrated, because the quality should be better than alpha versions now.

Hopefully the first RC version will be released in June or early July.

Regards
Roger

Message has been deleted

Roger

unread,
Jun 4, 2015, 9:21:05 PM6/4/15
to kao.l...@gmail.com, nwjs-g...@googlegroups.com
The 'app' protocol is yet migrated in this version. You can just use "core/index.html" for the "main" field.

Currently it will use the 'chrome-extension://' protocol by default, and it may replace the 'app' protocol in the final version.

Roger

On Fri, Jun 5, 2015 at 12:22 AM <kao.l...@gmail.com> wrote:
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:
 core
 nwjs
 package.json
 nw.exe shortcut to nwjs folder

nw.exe shorcut has "nw.exe ../package.json" parameter

in 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.

papie...@live.com

unread,
Jun 5, 2015, 2:46:28 PM6/5/15
to nwjs-g...@googlegroups.com
I'm not quite sure how to get the path to dropped files. path seems to be no longer available on File objects. Any hint?

plo...@gmail.com

unread,
Jun 10, 2015, 5:43:46 AM6/10/15
to nwjs-g...@googlegroups.com
Awesome!
the only thing that i felt lacked in v12 was print preview and pdf rendering!

Btw some quick fix i had to do from v12 if it can be useful to quickly adapt to the new version:
  1. aw files are not yet implemented, use FULL path to folder tu run ( nw c:/your/project/path/ ) to run it
  2. replace all require() in your code with nw.require()
  3. node-remote in package.json now takes an array (example: "node-remote":["localhost"] )


i hope there will be options to set print setting for print preview or at least for direct printing; something like this:

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..
});


A similar interface would be awesome if used to convert a page to pdf.

plo...@gmail.com

unread,
Jun 10, 2015, 8:04:17 AM6/10/15
to nwjs-g...@googlegroups.com
i'm getting an error and i thing it's a bug (aka not yet implemented feature) on closing stdin on spawned child:

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!"}


Message has been deleted

armo...@gmail.com

unread,
Aug 21, 2015, 5:11:27 PM8/21/15
to nw.js
Testing the 0.13 Alpha2 version, I'm really surprised by the good stability and compatibility when running Chrome Apps samples. Mixing the possibilities of nwjs and chrome apps is a really good idea!

When running a chrome app in nwjs, an important feature for me would be to add a way to disable and hide this annoying "Inspect Element" context menu item and disable the other ways to start the debug window in order to prevent application users from "investigating" inside the code of an app. The debug window should obviously remain available for developers only, not for end-users (in a professional environment for example).

I can see in manifest.json that the devtools page can be modified, thus overridden and probably therefore disabled (I guess, I didn't test in Chrome -yet-) but removing the item without having to block the right-menu pop up window would be really nice too.

Brgds

armo...@gmail.com

unread,
Aug 21, 2015, 7:44:40 PM8/21/15
to nw.js

Hum, small correction : specific manifest.json version for chrome apps don't have the devtools field, I must see if there is already another way to disable devtools window.

Roger Wang

unread,
Aug 24, 2015, 9:20:37 AM8/24/15
to nw.js, armo...@gmail.com
Hello,

There are several build flavors. In regular (non-sdk) build there is no devtools or "inspect element" in it.

Thanks,

Roger

armo...@gmail.com

unread,
Aug 24, 2015, 1:51:43 PM8/24/15
to nw.js, armo...@gmail.com
Hello Roger,
I hadn't understand the difference between the two releases, thank you for the explanation.

The issue is, I didn't see the difference between nwjs-v0.13.0-alpha2-win-ia32 and nwjs-sdk-v0.13.0-alpha2-win-ia32 because in both cases, the "Inspect element" item was visible. The difference appears only when you click: you get either the debug window or an error window.

Could it be possible to hide the "Inspect element" item in regular mode?

Brgds

armo...@gmail.com

unread,
Aug 24, 2015, 5:29:35 PM8/24/15
to nw.js, armo...@gmail.com
Sorry, I forgot to mention that I have experienced this situation with a context menu on a webview object. If you run chrome apps context menu sample (https://github.com/GoogleChrome/chrome-app-samples), it behaves correctly ("Inspect [...]" menu item is visible with SDK build, not with standard build). You can test the webview\new-window-user-agent and open the context menu in the browser window to compare.
Thanks.

Brgds

mohamed....@gmail.com

unread,
Oct 23, 2015, 10:17:13 AM10/23/15
to nw.js
Will the Chrome Apps be able to use the GCM push api? Or is that something Google reserves for Chrome itself and doesn't make available for open source Chromium?

3272...@qq.com

unread,
Jan 22, 2016, 4:03:18 AM1/22/16
to nw.js
can nw.js support for ARC Welder ? I want to use ARC Welder on the NW.JS , can it work?
Reply all
Reply to author
Forward
0 new messages