[Project_owners] Re: URL of current document

Philip Chee philip.chee at gmail.com
Fri Aug 26 23:34:35 EDT 2005


On Thu, 25 Aug 2005 17:16:45 +0200, Michael Vincent wrote:
> Philip Chee wrote:

>> What's the recommended way from chrome of getting the URL of the current
>> document being displayed in a window?

>> document.location.href
>> window.document.location
>> window.location.href
>> document.url

> I would say: getBrowser().mCurrentBrowser.currentURI.spec

Thanks, that works wonders.  Is it possible to use gBrowser instead of
getBrowser()?

Phil
-==-
Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://fashblock.mozdev.org/
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]Copy from another: plagiarism. Copy from many: research.
* TagZilla 0.059


More information about the Project_owners mailing list