[whatwg] URL decomposition on HTMLAnchorElement interface

Boris Zbarsky bzbarsky at MIT.EDU
Thu Mar 26 12:08:52 PDT 2009


João Eiras wrote:
> Browsers also support partially setting each of the url fields separately, although error handling between all of them is very inconsistent.
> Note: if you specify this behavior, then you need to specify what happens for http:, https:, data:, mailto: and unknown:

If you specify the setters then you also need to specify how this 
affects the value of the "href" attribute in the DOM.  For example, in 
Gecko if you have an <a href="foo#bar"> which has base URI 
"http://example.com/" and you set anchor.hash on that anchor to "baz", 
then the attribute value is changed to "http://example.com/foo#baz".  I 
can't speak to what happens in other browsers.

-Boris



More information about the whatwg mailing list