I want to start using 'jsdom' package jsdom: https://github.com/tmpvar/jsdom
I saw the following code snippet in the documentation:
var jsdom = require("jsdom");
jsdom.env("http://nodejs.org/dist/", [
'http://code.jquery.com/jquery-1.5.min.js'
],
function(errors, window) {
console.log(window);
// I want to open a browser window that will show the content of window
}
);
As you can see, I can use 'jsdom' to pull the data from the website " http://code.jquery.com/jquery-1.5.min.js". Now, I want to take the data I have in 'window' variable, make some manipulations on it and then open a browser and show the manipulated data.
I know that 'open' package can help me open a browser, but I have to give it a URL as an argument. It cannot process 'window' object. Do you have any ideas?