Can the window object be accessed directly from the document object in Javascript?
For instance:
// accessing the first frame or iframe document object using window.frames[0]
myFunction(window.frames[0]);
function myFunction(doc) {
// attempting to get the window object like this:
var wnd = doc.getWindow();
alert("Frame found: " + wnd.name);
for (var i=0; i<wnd.frames.length; i++) {
myFunction(wnd.frames[i]);
}
}
Unfortunately, jQuery is not an option in this case.