Wednesday, November 17th, 2010

Our Latest Lab Experiment: JSDOM

By Rich Ziade

Since its release last year, node.js has captured the imagination of developers interested in building highly scalable event-driven applications and scripts. For the unfamiliar and less technical among us, node.js executes server-side Javascript in an incredibly efficient manner. This allows for highly scalable, high concurrency applications to be built with Javascript (yes, Javascript).

Any front-end Web developers comfortable with Javascript would love to play with a tool as powerful as node.js. There’s just one imgressnag: node.js doesn’t have a Document Object Model (DOM) or a Browser Object Model (BOM).  As a result, much of the functionality found in the browser is unavailable.  For example, commonly used functions like getElementById and getElementsByTagName or the ability to create document or window objects is unavailable. That’s hardly “Javascript” as commonly understood by most Web developers.

Enter JSDOM, the latest Arc90 Lab experiment. JSDOM is a library that enhances node.js by providing a BOM and a DOM that works like what you would expect on a browser.  It effectively gives you nearly all of the standard capabilities commonly built into nearly every Web browser available today. JSDOM is the brainchild of our very own (and very talented) Elijah Insua. Eli enjoys playing in the nether-regions of programming languages, and JSDOM is just one of his ambitious endeavors. JSDOM has been lurking on github for awhile as Eli has been working on the project. We’re proud to have it under the Arc90 Lab banner.

JSDOM is released and freely available for use under an open source MIT License.

3 Responses

  1. Ernest Ellingson said:

    I run into a problem installing jsdom with npm. Basically I get an error that SSL is undefined. I’m a node newby. I have looked on the web with Google and found a log report on github that has a similar error, but haven’t found a solution to the problem. Can you help?

  2. Chris Dary said:

    Ernest: Maybe this recent issue with NPM is your problem?

    https://github.com/isaacs/npm/issues/1406

    As an aside: We don’t typically offer support through our blog, particularly for open source projects.

    The JSDOM mailing list might be a good place to look: https://groups.google.com/forum/#!forum/jsdom

Leave a Comment