Re: getElementsByName should match any element

On Thu, 14 May 2009, Simon Pieters wrote:
>
> It seems getElementsByName as specified in HTML5 does not match what 
> WebKit, Gecko and Opera do.
> 
> HTML5 says to only match a certain set of elements with a name 
> attribute. WebKit and Gecko match any element (in any namespace) with a 
> name attribute. Doing what the spec says will likely break pages [1], so 
> we'll probably align with WebKit and Gecko here.
> 
> [1] http://my.opera.com/hallvors/blog/show.dml/265582

As far as I can tell the spec does match what the most widely deployed 
browser does.

What do other browser vendors want here? Should I not match IE?

(I definitely don't want to make it ignore the namespace. It's bad enough 
that we're considering making APIs that encourage screwing up HTML by 
sprinkling name="" attributes everywhere; we don't want to screw up SVG 
and MathML as well.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 9 June 2009 23:39:22 UTC