Re: Can I get document.links in JavaXPCOM ?

Carfield Yim <[email protected]>
Newsgroups gmane.comp.mozilla.devel.oji
Organization http://groups.google.com
Message-ID <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.