There will be a web-page that will access my object via JaveScript exactly as I specified in my original post. In other words my object will not be invoked until user visits a web-site and opens a certain web-page on it. My understanding that the WebLock example does different things. It needs to register for events because it wants to intercept any URL while I just want to know the URL of the page from which my object is created and accessed. This sounds like an easy thing but I still cannot find any solution for this.
Any further ideas? Thanks! dupes wrote: > 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 [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
