Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Short answer: use node. Use it right now. In fact, here's a link to the latest native Windows .exe which is standalone with no dependencies: <a href="http://nodejs.org/dist/v0.5.4/node.exe" rel="nofollow noreferrer">http://nodejs.org/dist/v0.5.4/node.exe</a></p> <p>Long answer: env.js is/was a cool project. It simulates a js environment in js. It can run in other environments and stuff. Whatever, it doesn't matter.</p> <p>Node.js is a js host environment that runs on top of V8. V8 is the fastest js environment there is, powers Chrome, etc. Node itself is for the native system environment what regular js is to a browser: an powerful combination of APIs mixed together in a witches brew of ease of developer use and breadth of feature set.</p> <p>On the browser you get control over video, audio, user input, etc. via DOM extensions to javascript. With node on the server (or just your own computer, it has a LOT of applications beyond regular server usage) you get incredible support for all types of IO: http/udp servers and clients that do all the boilerplate work for you, file I/O, managed data streams for handling said network and file I/O, access to spawn and communicate with child or fork processes, and direct access to V8's compiler to compile and save/run javascript bytecode.</p> <p>In regards to the DOM, there's at least one full (html) implementation of the DOM for node and multiple partial ones. At least YUI, jQuery, and MooTools that I know of can be run in Node trivially on top of a DOM library to construct DOMs from any source you'd like as you would in the browser, and then serialize it to html or whatever.</p> <p><a href="https://github.com/tmpvar/jsdom" rel="nofollow noreferrer">https://github.com/tmpvar/jsdom</a> is the DOM implementation that runs on in node (or any javascript environment I believe). </p> <p><a href="https://github.com/tmpvar/jsdom/blob/master/example/browser/browser.js" rel="nofollow noreferrer">https://github.com/tmpvar/jsdom/blob/master/example/browser/browser.js</a> is an example of emulating a browser:</p> <pre><code>var sys = require('sys'); var dom = require('../../lib/jsdom/level2/html').dom.level2.html; var browser = require('../../lib/jsdom/browser/index').windowAugmentation(dom); var document = browser.document; var window = browser.window; var el = document.createElement('div'); el.id = 'foo'; el.innerHTML = '&lt;em&gt;This is a test&lt;/em&gt; This &lt;strong class="odd"&gt;is another&lt;/strong&gt; test '; document.body.appendChild(el); sys.puts(document.outerHTML); </code></pre> <p>Some other libs that may enlighten your way to a decision</p> <ul> <li><a href="https://github.com/andreasgal/dom.js" rel="nofollow noreferrer">https://github.com/andreasgal/dom.js</a> (or my fork to simplify usage in Node: <a href="https://github.com/Benvie/dom.js" rel="nofollow noreferrer">https://github.com/Benvie/dom.js</a>)</li> <li><a href="http://lightnode.ngspinners.com/" rel="nofollow noreferrer">http://lightnode.ngspinners.com/</a></li> <li><a href="http://stephank.github.com/domjuice/" rel="nofollow noreferrer">http://stephank.github.com/domjuice/</a></li> <li><a href="https://github.com/hij1nx/weld" rel="nofollow noreferrer">https://github.com/hij1nx/weld</a> </li> <li><a href="http://visionmedia.github.com/caustic/" rel="nofollow noreferrer">http://visionmedia.github.com/caustic/</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload