Have you looked at the xpcom tutorial, WebLock?
(http://www.mozilla.org/projects/xpcom/book/cxc/).  The example built
in the document uses the nsIObserverService to register for events and
when certain events occur, say loading a new url, all registered
observers are notified.  If this won't work for you, there may be a
xpcom browser object (probably a service???) that will give you a
pointer to the browser which in turn may contain functions for things
like getting the current url.  I found an object called
nsIBrowserHistory that has an attribute of type utf8string called
something like getLastUrl, but the interface does not appear to be
frozen....  At any rate, take a look at the weblock tutorial.  It's
very long but helpful.

How will your xpcom object be invoked?  Knowing how/when the object is
created will help determine possible solutions to your problem.

dupes

_______________________________________________
Mozilla-xpcom mailing list
Mozilla-xpcom@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to