What about document.location.href? --- Alex Eng <[EMAIL PROTECTED]> wrote:
> Currently, the code inside a JavaScript object which I implemented > for a > Firefox extension retrieves the "chrome:" URL of the current chrome > window using the "window.location.href" property. > > However, I want to move that code into an JavaScript XPCOM object > (FYI, > to eliminate duplication in initialization of the RDF datasources in > several UI locations in my extension; this XPCOM object would be a > singleton object and will therefore be instantiated using > getService). > And from what I've researched, the "window" object will not be > accessible in the context of a XPCOM object. > > I've done some reading into nsIWindowMediator, and while it can be > used > to find out if a particular window exists, there doesn't seem to be a > > way to find out from that XPCOM service if the current window from > which > it is invoked from has a given "chrome:" URL. Unless there is > something > that I missed. > > Any pointers and suggestions are appreciated. > _______________________________________________ > Project_owners mailing list > [email protected] > http://mozdev.org/mailman/listinfo/project_owners > _______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
