[whatwg] getElementsByClassName()

Quoting Kornel Lesinski <kornel at ideadesigners.com>:
> It will also solve IMHO unclear case of getElementsByClassName("foo 
> bar")  matching "bar foo". It would, as opposed to behavior where 
> space is both  separator and part of class name.

This is not how the CLASS attribute works. "foo bar" means the element has two
classes bound to it, "foo" and "bar". With your syntax,
getElementsByClassName("bar foo") would also need to match an element 
with "foo
bar" as value for the CLASS attribute.

Kind regards,

Anne


-- 
Anne van Kesteren
<http://annevankesteren.nl/>

Received on Sunday, 4 September 2005 09:51:43 UTC