Re: Can I get document.links in JavaXPCOM ?
Carfield Yim <[email protected]> Wed, 04 Jul 2007 06:36:05 -0000
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1183530965.081820.105240__42851.7547356479$1183531217$gmane$org@o11g2000prd.googlegroups.com> |
> 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. > Thanks, that mean I need to construct the absolution URL myself... actually not a major problem , I just wonder can I just get from the API or not. By the way, is the relative URLs I get only is "/folder/file.html" so that I just add the protocol and host is ok; Or it will be only "file.html" so that I need to detect for this case and add folder also?