3 May 2011 13:36
FireFox 4 crashes when trying to find the parent document for an internal document using DOM API GetParentDocument()
Madhu Tadiparthi <madhut00 <at> gmail.com>
2011-05-03 11:36:36 GMT
2011-05-03 11:36:36 GMT
I have a web application where I have frames/Iframes in that. What I am
trying is to get the top level document from the internal document which is
a child of Frame/Iframe. I am facing an issue in getting the parent document
node from an internal document node in FireFox 4 using GetParentDocument
API. The browser is crashing at the Line 7 in the sample code. Here is the
sample code that I tried. The same is working good till Firefox 3.6
nsIDocument* getParentDocument(nsIDOMHTMLDocumentPtr htmlDocument )
{
nsIDocumentPtr document = do_QueryInterface(htmlDocument) ;
nsIDocument* parentDoc ;
parentDoc = document->GetParentDocument(); //Line 7
return parentDoc;
}
How can I get the parent document for the internal documents. Any
inputs/comments are higly appreciated.
Thanks
Madhu Tadiparthi
RSS Feed