Re: Packaging all sub-DOMs of frames/iframes in a page into a single document object.
stony_dreams <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Ok.. I found the way to extract all the documents of the frames as follows:
var allFrames =
window.top.getBrowser().selectedBrowser.contentWindow.frames;
var allDocuments = new Array();
for(var i = 0; i < allFrames.length; i++){
//Access individual doms by allFrames[i].document
}
I am still thinking how to put all these documents together so that when i
use the XMLSerializer(), i get one big well formed XML string containing all
the documents.
Also, I want to set some attributes to all the elements of this giant DOM.
Somehow I am not able to use the setAttribute() function on the elements of
the inner DOMs. Is it allowed anyways? Am i doing somethin wrong?
I appreciate any help..
Thanks...
--
View this message in context: http://www.nabble.com/Packaging-all-sub-DOMs-of-frames-iframes-in-a-page-into-a-single-document-object.-tp15033116p15035733.html
Sent from the Mozilla - DOM mailing list archive at Nabble.com.