vonuyx wrote:
// Get the web browser
nsCOMPtr<nsIWebBrowser> pWebBrowser;
pServman->GetServiceByContractID("@mozilla.org/embedding/browser/nsWebBrowser;1" , NS_GET_IID(nsIWebBrowser), getter_AddRefs(pWebBrowser));

You can't do that. This is no service; each window would have its own instace of this component. Not to mention that Mozilla and Firefox do not use nsWebBrowser.


You can get the DOM Window from aWebProgress in nsIWebProgressListener, and from it the location object, from which you can get the href property which gives you the URL (as a string).

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to