Node-webkit 0.7.1 innovations
Just today (August 19) Intel's Technology Center open source gave on-gorá the next version of the engine node-webkit . This engine, as before, is interesting in that it can open browser-like windows (based on Chromium code) and use the Node.js API in them - so that it provides easy creation of GUI applications using web development methods (in JavaScript, HTML, CSS, WebGL , etc.) for Windows, Mac OS X, and Linux operating systems.
The new version received thenumber 0.7.1 and contains the Node engine version 0.10.12 , as you can easily see in the test window:
I opened the code for the test windowon Github today , so those who wish can familiarize themselves with it and see for themselves that the initial (helloworld) programming steps for node-webkit are no more complicated than regular web development, enhanced by the capabilities of the Node API .
Less than a month ago (July 24),I reviewed one of the previous versions of node-webkit (version 0.6.3). Not much time has passed since then, however, a number of not uninteresting innovations appeared in node-webkit :
The new version also fixes bugs that in some cases previously led to the crash or freeze of the application.
The new version received the
I opened the code for the test window
Less than a month ago (July 24),
- Support for the app protocol has appeared . Now, in the application manifest, you can write the main parameter in the form of
" " main ": " app: // hostname / path " ", and any identifier can act as the host name( hostname ) , and the path( path ) is counted from thatroot directory , in which the manifest itself lies (filepackage.json ). After that, in the browser part of the application (in HTML, in CSS, etc.) all “absolute addressesfrom the root” (starting with a slash) will begin to be counted from the same directory - this effect will be extremely useful for those who are repackagingunder a node-webkit some such application that previously spun on the Web and contained a lot of paths “from the root”. It is clear that this is a special case. If the case is the opposite (all paths were relative), then you can not mess with the new protocol, but in the valueof "main" write, as before, the relative path from the manifest. (In the simplest case,"index.html" .)
- Now you can use a javascript to change the value of an
input elementthat has thetype = "file" attribute; in this way, full automation of file uploads to the network is ensured by the intra-browser method (which is more convenient than in the Node API).
- In the new
App.manifest field,you can read the application manifest values. You do not need to dorequire ('package.json') once again, because all this information is already read bynode-webkit when the application starts.
- The
App.open eventhandler now receives the entire command line. Previously, each command line parameter triggered a separate such event, but now you can handle those cases when the command line not only lists the files that need to be opened, but also indicates parameters that havesome other value (for example, settings flags).
- The getUserMedia API can now be used to capture a copy of the entire screen (as in the example for Chrome intended).
The new version also fixes bugs that in some cases previously led to the crash or freeze of the application.