Re: Can I get document.links in JavaXPCOM ?
Carfield Yim <[email protected]> Tue, 10 Jul 2007 15:53:11 -0000
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1184082791.607351.164070__44517.1911655509$1184082925$gmane$org@e9g2000prf.googlegroups.com> |
On 7 4 , 11 30 , Christian Biesinger <[email protected]> wrote: > Carfield Yim wrote: > > 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. > > There is an API. Call QueryInterface for nsIDOMHTMLAnchorElement and > then call getHref(). > > > 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? > > getAttribute returns whatever the web page author specified in the > attribute... So even I found that getHref() method, I will return relative URL if the HREF attributes is relative?? Is that what discussed in http://groups.google.com/group/mozilla.dev.tech.dom/browse_thread/thread/13e5ab324e7f11d8/4360a8ceb90c4088#4360a8ceb90c4088 is not valid for JavaXPCOM?