title: Node.js jsdom error
body: <p>I am trying to get jsdom to work :) </p>
  
  <p>Here's the code:</p>
  
  <pre><code>var jsdom = require("jsdom");
  var request = require("request");
  var fs     = require('fs');
  var jquery = fs.readFileSync("./jquery-1.7.2.js", 'utf-8');
  
  request({ uri:'http://nodejs.org/dist/' }, function (error, response, body) {
      if (error &amp;&amp; response.statusCode !== 200) {
          console.log('HTTP request error... '+error);
      }
      jsdom.env({
          html: body,
          scripts: [
              jquery
          ],
          done: function(errors, window) {
              console.log('done');
          }
      });
  });
  </code></pre>
  
  <p>And here's the error:</p>
  
  <pre><code>jsdom.js:171
      features   = JSON.parse(JSON.stringify(window.document.implementation._fea
                                                            ^
  TypeError: Cannot read property 'implementation' of undefined
  </code></pre>
  
  <p>I have checked if the page is fetched and if the jquery lib is parsed - they are.</p>
  
  <p>We could look at the implementation of jsdom.js: </p>
  
  <pre><code>[snip]
  exports.env = exports.jsdom.env = function() {
      [snip]
      window     = exports.html(html, null, options).createWindow(),
      features   = JSON.parse(JSON.stringify(window.document.implementation._features)),
      docsLoaded = 0,
      [snip]
  </code></pre>
  
  <p>It seems that the .createWindow() is not successful...</p>
  
  <p>And I am running it on <a href="http://c9.io" rel="nofollow">Cloud9</a>.</p>
  
  <p>Any help is welcome.</p>