Back to Home

Node-webkit innovations version 0.3.6

Node.js · NodeJS · node-webkit · WebKit · Intel · GUI · cross-platform development · icon · icon · kiosk mode · command line · auto-substitution · plug-ins · NPAPI · debugger · JavaScript debugging · source maps · Clojure · TypeScript · Pointer Lock API · cookies · restart

Node-webkit innovations version 0.3.6

    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 bowels of the Intel Open Source Technology Center, which allows you to create 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]

    Compared to version 0.3.0, which I reviewed in October , only small changes have occurred over the past two months, deserving no 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 notice that the windows have lost their "round" and "blue" appearance, similar to Google Chrome, but instead regained their system-wide appearance and shape. (In the illustration, I present the window view in Windows XP.) The icon in the window title has also returned. (For today's demo, I put the Habrahabr site icon there .)

    Here is a list of the other innovations of this version (compared to 0.3.0):

    • 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 the package.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 of node-gyp, which is used to build binary code for non-javascript modules for node-webkit in the same way as node-gyp collects them for Node. (This is necessary because Node and node-webkit have different ABIs .)
       
    • 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 bundled 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 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 someone , because it simplifies life.

    Read Next