Re: Can I get document.links in JavaXPCOM ?
Christian Biesinger <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.oji |
|---|---|
| Message-ID | <[email protected]> |
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...