var jsdom = require("jsdom");
jsdom.env({
features : {
FetchExternalResources : ['script', 'frame'],
ProcessExternalResources : ['script', 'frame']
},
done: function(errors, window) {
var document = window.document;
setTimeout(function() {
try {
var x = window.document.getElementsByName('leftFrame');
var fr = x[0];
console.log("fr.contentDocument: " + fr.contentDocument);
} catch (e) {}
}, 3000);
}
});
And the content of the page is
<HTML><title>Frame Example 01</title>
<FRAMESET COLS="80%,20%">
<FRAME NAME="leftFrame" SRC="leftFrame.html">
<FRAME NAME="rightFrame" SRC="frame00.html">
</FRAMESET>
This page loads fine in regular browser. I tried with and without setTimeout() but it did not work. What I am doing wrong here?