Morteza Milani
unread,Apr 27, 2012, 4:16:39 PM4/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
Hi,
Using AppJS you can create desktop applications with familiar
technologies: HTML5/CSS/JS. It uses CEF ( chromium embedded framework
) and it's cross platform ( or is going to be! ).
I tried to provide a nice API to work with. Here is an example:
var appjs = require('appjs');
var window;
// Initialize appjs.
var app = appjs.init();
// Called when page load finishes.
app.on("ready",function(){
console.log("Event Ready called");
// Runs a script in browser context.
window.runInBrowser(function(){
var body = document.body;
body.style.color="#f60";
});
// Show created window ( see below )
window.show();
});
// Called when webview needs to load
// a resource of type appjs://
app.on("route",function(req,callback){
// req.url and req.method are available
if(req.url == "appjs://app/") {
callback("text/html",
"<html>\
<head><title>Hello world</title></head>\
<body>Hello World</body>\
</html>");
}
});
// Creates a new window. Its invisible until window.show() get called.
window = app.createWindow({entryPoint:"appjs://app/",autoResize:false});
There are still works to do:
* Implementing platform specific codes for Mac and Windows.
* Implementing a good router like ExpressJS router.
* Separating Node thread from UI thread.
* Implementing DOM listeners etc.
If you like AppJS, help me to improve it;)
If you have any idea let me know.