How to get current instance (nsIWebNavigation) of mozilla?
[email protected] (yueweng)
| Newsgroups | gmane.comp.mozilla.devel.xpinstall |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <bdd3dfe3.0407160153.50cd39f8__5562.46900600872$1089971827$gmane$org@posting.google.com> |
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