W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2005

[whatwg] Re: getElementsByClassName

From: Jim Ley <jim.ley@gmail.com>
Date: Mon, 5 Sep 2005 19:49:26 +0100
Message-ID: <851c8d31050905114911621e3c@mail.gmail.com>
On 9/5/05, Ian Hickson <ian at hixie.ch> wrote:
> > That's why I propose to make this function use exactly the syntax that
> > class attribute uses. getElementsByClassName("bar foo") should match
> > class="foo bar", class="bar baz foo", etc.
> 
> I fear that this would be rife with implementation bugs, as opposed to
> requiring the author to pre-split the search input, which guarentees that
> the UA does not have to process the search input in any way, only having
> to deal with the actual class attribute.

Yet it's the exact same processing as the UA's already have for the
class attribute in HTML?  A UA already needs to tokenise a whitespaced
seperated string into classnames, what's different about this
whitespace seperated string?

Jim.
Received on Monday, 5 September 2005 11:49:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:42 UTC