[Project_owners] Re: URL of current document

Michael Vincent mv_van_rantwijk at yahoo.com
Fri Aug 26 18:48:30 EDT 2005

Philip Chee wrote:
> 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()?

Yes, that should be no problem, as long as it is initialized *before* 
you use it!


More information about the Project_owners mailing list