W3C home > Mailing lists > Public > public-html@w3.org > April 2009

Re: Selectors, getElementsByTagName() and camelCase SVG

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 03 Apr 2009 08:48:25 -0400
Message-ID: <49D60599.3010308@mit.edu>
To: HTML WG <public-html@w3.org>, www-svg <www-svg@w3.org>
Cameron McCormack wrote:
>> Was that the question?  Or were you asking about the two proposals to  
>> modify this?
> 
> Both, really.  It seemed like an agreement was being converged on, but
> it wasn’t apparent to me what exactly the changes being proposed were.

I don't think agreement is so much being converged on, but the only 
topic under discussion so far is what to do about nodes that are in an 
HTML (not XHTML) document, in the XHTML1 namespace, and have a localName 
that's not all lowercase.

> To me, it would seem to be confusing if getElementsByTagName() behaved
> differently depending on whether it was called on an HTML node or a
> different kind of node.  It would make more sense to me if it did case
> insensitive matching for an element in the subtree if it were an HTML
> element, and case sensitive otherwise (assuming we don’t want to make
> everything case insensitive in HTML documents, including foreign content
> nodes).  Also, I would expect selectors to just work case insensitively
> all the time.

Both of these are not compatible with current SVG content, right?  That 
is, if you drop existing SVG content into the middle of an HTML5 
document, doing the above would change the behavior of 
getElementsByTagName on nodes in the SVG, and would change the behavior 
of stylesheets the SVG links to.

That might be ok, but is worth careful thought.

The selectors thing would also be significantly slower, at least in Gecko.

-Boris
Received on Friday, 3 April 2009 12:49:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:33 GMT