W3C home > Mailing lists > Public > www-svg@w3.org > April 2009

Re: Selectors, getElementsByTagName() and camelCase SVG

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 03 Apr 2009 15:15:41 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>, "Henri Sivonen" <hsivonen@iki.fi>
Cc: "HTML WG" <public-html@w3.org>, www-svg <www-svg@w3.org>
Message-ID: <op.urta4fy064w2qv@annevk-t60.oslo.opera.com>
On Fri, 03 Apr 2009 15:02:03 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Agreed, which is why I'd like to not have this edge case dictate  
> implementation policy and affect performance of the common case to he  
> deree that it does with the spec as written.

How about we change getElementsByClassName() to do this:

   1. Let asciilowercasetoken be the result of lowercasing token.
   2. Iterate through the DOM and return elements which:

      a. Have the HTML namespace and whose localName is identical
         to asciilowercasetoken.
      b. localName is identical to token.

This would work well for Selectors too I think. You would never match  
createElementNS(HTML namespace,"IMG"), but that element does not have  
actual <img> semantics anyway and is something people would never do.

Anne van Kesteren
Received on Friday, 3 April 2009 13:16:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:17 UTC