On December 14, Roger Wang announced the release of a new version of
the node-webkit engine - a powerful combination of WebKit and Node.js, created in the depths of the Intel Open Source Technology Center, which allows creating
cross-platform graphical applications using web development in HTML, CSS and JavaScript.
The new version has the
number 0.3.6 and looks like this:
![[screenshot]](https://habrastorage.org/storage2/8b9/3af/333/8b93af333081c8ec4bf0264c0658f785.png)
')
Compared with version 0.3.0, which I reviewed
in October , over the past two months, only minor changes have occurred that deserve nothing more than the last digit in the version number of
node-webkit. But these changes have accumulated decently.
First of all, it is easy to see that the windows have lost their “rounded”
and “blue” look, similar to Google Chrome, and instead they have regained a system-wide look and shape. (In the illustration, I present a window view in Windows XP.) The icon in the window title also returned. (For today's demonstration, I put the
icon of the Habrakhabr site there.)
Here is a list of the remaining innovations of this version
(compared to 0.3.0):- A kiosk mode is possible in which the node-webkit swings open to full screen and cannot be closed with the mouse. (Suitable for building information terminals.)
- The autorun of the javascript mentioned in the node-main parameter in the package.json file is provided . (The script is launched in the context of the Node engine - and not in WebKit, as it would have been for the load event, for example. This is convenient for initializing Node modules.)
- Appeared API management application . (You can read the command line parameters, you can immediately close all windows of the application.)
- The <datalist> element is supported - which means there are hints for auto-filling text fields as you type the text.
- The nw-gyp tool was created - a node-gyp variant that serves to build binary code for non-JavaScript modules for node-webkit in the same way that node-gyp collects them for Node. (This is necessary because the Node and node-webkit ABIs are different.)
- You can put items in the window menu . (Another familiar GUI element.)
- Running console commands under Windows does not result in visible console windows. (As a rule, they were called only for a short time - and therefore their wink was not pleasant or useful to anyone.)
- You can use patent-protected codecs if you provide node-webkit with your own libffmpeg assembly. (But a limited version continues to ship with node-webkit .)
- Windows can prevent or delay their closure by intercepting and handling the close event.
- Application authors can attach to them (in the plugins subfolder) a certain set of browser plug-ins (NPAPI), which will be used along with the system-wide one.
- The window object is now available in the context of a Node with the same name.
- In the debugger, the source code of the scripts from the Node context became visible.
- The window can be given the “always at the top” property so that it overlaps other application windows.
- Source maps support has appeared, that is, the ability to see in the debugger the code of applications in other languages ​​compiled in JavaScript (for example, Clojure or TypeScript), if their compiler also supports this.
- There is support for the Pointer Lock API , that is, the ability to hold the mouse in the application and respond to its relative movement (like 3D shooters), and not to its position.
- Cookies are now stored on the computer after the application is completed (between launches).
- There was a button to completely restart the application by its developer (for debugging purposes). At the same time, the code for Node and the web-technological part (HTML, CSS, JS) in WebKit are restarted.
- Running nw.exe without parameters causes package.json (and applications) to be loaded from the same folder where node-webkit is located.
As you can see, in two months more than fifteen useful innovations have appeared, each of which will please
someone , because it simplifies life.