Madhu Tadiparthi
2011-05-03 11:36:36 UTC
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
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