[whatwg] <map id="">

Anne van Kesteren wrote:
> On Mon, 20 Aug 2007 12:58:29 +0200, Jonas Sicking <jonas at sicking.cc> wrote:
>> Given that behavior is so different in different UAs, it seems 
>> unlikely that a lot of sites depend on IEs behavior. So I suggest not 
>> matching what IE does.
> 
> What exactly is the problem? For image maps you can't use 
> getElementById() anyway as you have to check both id= and name=. To keep 
> behavior the same between HTML quirks, HTML standards and XML doing a 
> case-insensitive match makes some sense.

Why can't you keep ids case sensitive always for all those? Seems weird 
from a user perspective that ids are case sensitive in all cases except 
this one.

In gecko we keep a hash for id->element which is case sensitive. This 
hash is used for the implementation of getElementById, anchor scrolling, 
and anything else that uses ids.

We also have a hash for name->element which is case insensitive, this 
hash is used for things like form.elements.foo and document.foo and 
anything else that uses names.

What you suggest is to add a third hash for id->element which would be 
case insensitive and only used for <map>s.

/ Jonas

Received on Monday, 20 August 2007 16:54:29 UTC