[ANN] node-webkit: a NodeJS module for WebKit

1,827 views
Skip to first unread message

Roger WANG

unread,
Jan 4, 2012, 9:07:26 AM1/4/12
to nodejs
node-webkit brings WebKit to NodeJS. With it, client side applications
can be written with a HTML/CSS UI on NodeJS platform. We believe the
async I/O framework and Javascript language is a perfect combination for
client (mobile) side applications.

With this module, your Javascript code in HTML can call NodeJS functions
directly:

<html><head>
<title>testfs</title>
<script>
var fs = require('fs');

function test_fs() {
var output = document.getElementById ('output');
output.innerHTML = '';
fs.readdir(".", function (err, files) {
var result = '';
files.forEach(function (filename) { result += filename + '<br/>'; }
);
output.innerHTML = result;
});
}
</script></head>
<body onload="test_fs()">
<p id="output"></p>
</body>
</html>

Project URL:
https://github.com/rogerwang/node-webkit

Inside it, the webkit's mainloop is integrated into Node's libev. And
the contexts in Node's V8 and WebKit's V8 are bridged with references so
they can access each other.

This project is still in early stage. Currently only Linux is
supported. We'll keep working on it, make it better and bring it to more
platforms. It will be developed in an open way and we have a mailing
list: node-...@googlegroups.com . Welcome to join.

Thanks
--
Roger WANG Intel Open Source Technology Center

Tim Caswell

unread,
Jan 4, 2012, 9:36:29 AM1/4/12
to nod...@googlegroups.com
Nice work. I tried this a while back and got overwhelmed. Best of
luck. I would love to make desktop apps in node using HTML5 as the
GUI.

> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Ted Young

unread,
Jan 4, 2012, 1:56:28 PM1/4/12
to nod...@googlegroups.com
I'm also very excited for a project like this, I hope you nail it! Is this an Intel project, or is it a personal project?

btw random but the main downside I see with this technique is it opens the door to the XSS attack from hell. :)

Ben Combee

unread,
Jan 4, 2012, 5:45:54 PM1/4/12
to nod...@googlegroups.com
On Wed, Jan 4, 2012 at 12:56 PM, Ted Young <t...@radicaldesigns.org> wrote:
> I'm also very excited for a project like this, I hope you nail it!  Is this an Intel project, or is it a personal project?
>
> btw random but the main downside I see with this technique is it opens the door to the XSS attack from hell.  :)

webOS already did that :) Although we guard against it a bit by only
lowering the XSS protection for code run from local file:// URLs in
application mode, not from random web pages. Trying to navigate to a
remote URL from an installed app has the URL sent to the separate
"browser" WebKit instance.

Roger WANG

unread,
Jan 4, 2012, 7:37:15 PM1/4/12
to nod...@googlegroups.com
Tim Caswell <t...@creationix.com> writes:

> Nice work. I tried this a while back and got overwhelmed. Best of
> luck. I would love to make desktop apps in node using HTML5 as the
> GUI.

Thanks. We've got some ideas from the TODO list of topcube project :)

Roger WANG

unread,
Jan 4, 2012, 7:43:21 PM1/4/12
to nod...@googlegroups.com
Ted Young <t...@radicaldesigns.org> writes:

> I'm also very excited for a project like this, I hope you nail it! Is
> this an Intel project, or is it a personal project?

It's an Intel project. Here we have a high level and long term strategy
for supporting web applications, or applications written in web
technology. And this project is one of the efforts.

We definitely want to encourage developers to write applications on this
runtime. So feature requests are welcome :)

> btw random but the main downside I see with this technique is it opens
> the door to the XSS attack from hell. :)

Currently Node APIs can only be used in pages loaded from local. Does it
help?

If this goes to mobile, maybe we'd like to see more security features in
it. Like a controlled list of node modules that applications are allowed
to require().

Roger WANG

unread,
Jan 4, 2012, 7:45:23 PM1/4/12
to nod...@googlegroups.com, Ben Combee
Ben Combee <ben.c...@gmail.com> writes:

> On Wed, Jan 4, 2012 at 12:56 PM, Ted Young <t...@radicaldesigns.org> wrote:
>> I'm also very excited for a project like this, I hope you nail it!
>>  Is this an Intel project, or is it a personal project?
>>
>> btw random but the main downside I see with this technique is it
>> opens the door to the XSS attack from hell.  :)
>
> webOS already did that :)

Good to hear that :) especially after webOS is going to be open sourced!

May I know in which version is this feature?

Ben Combee

unread,
Jan 4, 2012, 8:52:33 PM1/4/12
to nod...@googlegroups.com
On Wed, Jan 4, 2012 at 6:45 PM, Roger WANG <roger...@linux.intel.com> wrote:
> Ben Combee <ben.c...@gmail.com> writes:
>> webOS already did that :)
>
> Good to hear that :) especially after webOS is going to be open sourced!
>
> May I know in which version is this feature?

It's been there from 1.0 -- local apps have always had the ability to
make XHRs to other domains, otherwise they wouldn't be able to talk to
any servers.

Now, running node.js code wasn't added until webOS 2.0, but that's
done through a separate service system. We've not had the ability to
run webkit from node -- just the other way, a local WebKit app can
make calls to a locally running node.js service that has the ability
to stay running in the background.

Tim Caswell

unread,
Jan 5, 2012, 4:23:19 PM1/5/12
to nod...@googlegroups.com
Roger, I get HTTP/1.1 403 Forbidden when I try to query the dpkg repo
for the build dependencies? Is there a username and password
required? (I'm on oneric)

Roger WANG

unread,
Jan 5, 2012, 7:26:36 PM1/5/12
to nod...@googlegroups.com
Tim Caswell <t...@creationix.com> writes:

> Roger, I get HTTP/1.1 403 Forbidden when I try to query the dpkg repo
> for the build dependencies? Is there a username and password
> required?

There isn't any password. It seems to be just Amazon S3 returning that
code for files not found.

> (I'm on oneric)

It should be oneiric. Maybe there is a typo in your sources.list?

Tim Caswell

unread,
Jan 5, 2012, 10:22:05 PM1/5/12
to nod...@googlegroups.com
Yep that was it. Now it's failing because I'm on 64 bit and the
dependencies are 32 bit. I can live with that for now. I assume
there will be more binaries as the project progresses. (Time to spin
up a 32bit vm)

Mahin

unread,
Feb 7, 2012, 5:00:00 PM2/7/12
to nodejs
Are you trying to achieve something like Chromeless project?
http://mozillalabs.com/chromeless

using Chromess, you can develop desktop apps using HTML5, CSS,
Javascript and compile it to respective platform

Roger WANG

unread,
Feb 8, 2012, 8:09:27 AM2/8/12
to nod...@googlegroups.com
Mahin <screep...@gmail.com> writes:

> Are you trying to achieve something like Chromeless project?
> http://mozillalabs.com/chromeless
>
> using Chromess, you can develop desktop apps using HTML5, CSS,
> Javascript and compile it to respective platform

Well, there might be some similarity in the technology, but the ideas
are different. The single important idea of node-webkit is to call
*Node* modules from the (local) webpage. It opens a new way of writing
client side applications, and most importantly -- based on the great
Node platform with all kinds of modules and async I/O framework.

Roger WANG

unread,
Apr 26, 2012, 10:42:25 PM4/26/12
to nodejs
> This project is still in early stage. Currently only Linux is
> supported. We'll keep working on it, make it better and bring it to more
> platforms. It will be developed in an open way and we have a mailing
> list: node-...@googlegroups.com . Welcome to join.

We just finished the initial working version for Windows and OSX. And
it's now integrated with CEF (Chromium Embedded Framework). If you are
interested, please see the announcement here:

https://groups.google.com/d/msg/node-webkit/vxlrEtkLpBk/YpA8K9g27kEJ

(Prebuilt binaries are not available yet but the source code is
published.)

Regards,

Roger
Reply all
Reply to author
Forward
0 new messages