Re: Can I get document.links in JavaXPCOM ?
Michal Ceresna <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.oji |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 03 July 2007, Carfield Yim wrote: Hello, > HI, is that I cannot get absolute URLs using htmlDoc.getLinks()? I've > tried to use the following code but I can still just get the relative > URLs, why will that happened? You have to resolve the relative urls against a base url. For obtaining the base URI you can for example query-interface browser window to a nsIWebNavigation and then read the currentURI property. best regards, Michal