Node-webkit innovations version 0.3.6
The new version has the
![[screenshot]](https://habrastorage.org/storage2/8b9/3af/333/8b93af333081c8ec4bf0264c0658f785.png)
Compared to version 0.3.0, which I reviewed
First of all, it is easy to notice that the windows have lost their "round"
Here is a list of the other innovations of this version
- The kiosk mode is possible in which
node-webkit swings to the full screen and cannot be closed with the mouse. (Suitable for creating information terminals.)
- Autorun is provided for the javascript mentioned in the
node-main parameter in thepackage.json file. (The script is run in the context of the Node engine - and not in WebKit, as it would be for the load event, for example. This is convenient for initializing Node modules.)
- The application management API has appeared . (You can read the command line parameters, you can immediately close all application windows.)
- An element
is supported- which means that prompts for autocomplete text fields appear as text is printed.
- The
nw-gyp tool is created - a variant ofnode-gyp, which is used to build binary code for non-javascript modulesfor node-webkit in the same way asnode-gyp collects them for Node. (This is necessary because Nodeand node-webkit have differentABIs .)
- You can put items in the window menu . (Another familiar element of the graphical user interface.)
- Running console commands under Windows does not produce visible console windows. (As a rule, they were called only for a short while - and therefore their wink was not pleasant or useful to anyone.)
- You can use patented codecs if you provide
node-webkit with your own libffmpeg build. (But a limited version continues to be bundledwith node-webkit .)
- Windows can prevent or delay their closure by intercepting and handling the close event .
- Application authors can attach to them (in the subfolder
plugins ) a certain set of browser plug-ins (NPAPI), which will be used along with the system-wide.
- The window object became available in the Node context under the same name.
- In the debugger, the source code of the scripts from the Node context became visible.
- A window can be given the “always at the top” property so that it overlaps other application windows.
- There is support for source maps , that is, the ability to see in the debugger code for 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 react to its relative movement (like
3D shooters), and not to its position.
- Cookies are now saved on the computer after the application is completed (between starts).
- A button appeared to completely restart the application by its developer (for debugging purposes). At the same time, the code for Node is restarted, as
well as the web-technology part (HTML, CSS, JS) in WebKit.
- Running nw.exe without parameters leads to downloading package.json (and the application) from the same folder in which
node-webkit is located.
As you can see, in two months more than a dozen useful innovations appeared, each of which will please