Dear all,

I am wondering how do I get the instance of current browser,
mWebBrower or webNav (see below). My code current hook on Mozilla.exe
using nsIWebProgressListener?  I would like to use the browser
instance to do the following:

nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mWebBrower));
nsCOMPtr<nsIDOMDocument> domDocument;
webNav->GetDocument(getter_AddRefs(domDocument));
nsCOMPtr<nsIDOMHTMLDocument>
htmlDomDocument(do_QueryInterface(domDocument));
nsString title;
res = htmlDomDocument->GetTitle(title);

Regards,
yueweng
_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to