Here is a simple code in which I always get pXULDoc as NULL. I don't
know why?
where m_pWindow is equal to Javascript window.
nsCOMPtr<nsIDOMDocument> pDomDocument;
m_pWindow->GetDocument(getter_AddRefs(pDomDocument));
if(pDomDocument)
{
nsCOMPtr<nsIDOMXULDocument> pXULDoc =
do_QueryInterface(pDomDocument);
if(pXULDoc)
{
// Do Something
}
}
Q1> Why do I get pXULDoc as NULL?
Q2> If I replace
nsCOMPtr<nsIDOMXULDocument> pXULDoc =
do_QueryInterface(pDomDocument);
with
nsCOMPtr<nsIDOMDocumentXBL> pXBLDoc =
do_QueryInterface(pDomDocument);
then I get a valid pointer? Why?
Thanks
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom