Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:59:19+00:00 2026-06-02T14:59:19+00:00

I am trying to get jsdom to work :) Here’s the code: var jsdom

  • 0

I am trying to get jsdom to work 🙂

Here’s the 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 && response.statusCode !== 200) {
        console.log('HTTP request error... '+error);
    }
    jsdom.env({
        html: body,
        scripts: [
            jquery
        ],
        done: function(errors, window) {
            console.log('done');
        }
    });
});

And here’s the error:

jsdom.js:171
    features   = JSON.parse(JSON.stringify(window.document.implementation._fea
                                                          ^
TypeError: Cannot read property 'implementation' of undefined

I have checked if the page is fetched and if the jquery lib is parsed – they are.

We could look at the implementation of jsdom.js:

[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]

It seems that the .createWindow() is not successful…

And I am running it on Cloud9.

Any help is welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:59:23+00:00Added an answer on June 2, 2026 at 2:59 pm

    I found the answer to the question.

    A piece of it can be found on http://support.cloud9ide.com/entries/21243717-accessing-your-private-running-project-via-javascript-or-curl .

    So, in order to make jsdom work on cloud9, one needs to use an older version (like 0.2.1) and run the script with an older version of node (like 0.4, which is supported on cloud9).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to get comfortable with jQuery and I have encountered some sample code that
I am trying get response from servlet use request.setAttribute(error, error); request.getRequestDispatcher(http://localhost:8080/redicted_test/Home.jsp).forward(request, response); String redictedURL=http://localhost:8080/redicted_test/Home.jsp;
I am trying get Struts 2 and Tiles to work and I am using
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
Trying to get a JSON output to work with jqGrid 'userdata' option. The example
trying to get my head around Feedzirra here. I have it all setup and
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES.
I'm trying get some licensing code from AndroidPit.com working, but I get Unable to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.