Thanks a lot :-) You saved my day!
I don't know why I did not think of the nsIDOMHTML* classes. All my
attention was on the nsIDOM* classes.

Anyway if others need this, simply do something like the following:

#include <nsIDOMHTMLFrameElement.h>
....

nsCOMPtr<nsIDOMHTMLFrameElement> piFrame;
piFrame = do_QueryInterface( pPointerToDomNodeThatCouldBeAFrame );
if ( piFrame ) {
        nsCOMPtr<nsIDOMDocument> pIDOMDocument;
        piFrame->GetContentDocument( getter_AddRefs(pIDOMDocument) );
}
// Now pIDOMDocument should be the root document/node of the frame.

-Martin



_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to