Re: A URL API

On Sep 17, 2010, at 1:01 PM, Adam Barth wrote:

> On Fri, Sep 17, 2010 at 11:51 AM, Maciej Stachowiak <mjs@apple.com> wrote:
> 
>> It might be nice to provide the parts of this that make sense on HTMLAnchorElement and Location, then see if a new interface really pulls its weight.
> 
> Another piece of functionality that's missing from HTMLAnchorElement
> is the automatic stringification of URL objects.  That lets you pass
> URL objects into APIs that expect URLs represented as strings.  It's
> unlikely that we'd want to add that part of the interface to
> HTMLAnchorElement.

That does not match my recollection or testing:

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cbody%3E%0A%3Ca%20href%3D%22http%3A%2F%2Fsome-domain.com%2Fsome%2Fpath%23frag%22%20id%3Dtest%3E%3C%2Fa%3E%0A%3Cscript%3E%0Adocument.write(document.getElementById(%22test%22))%3B%0A%3C%2Fscript%3E

Good point about the Worker use case where there is no DOM.

Regards,
Maciej

Received on Saturday, 18 September 2010 04:53:25 UTC