Re: Can I get document.links in JavaXPCOM ?
Michal Ceresna <[email protected]> Tue, 3 Jul 2007 18:31:51 +0200
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <200707031831.52272.michal.ceresna__39025.1915123828$1183480611$gmane$org@gmail.com> |
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