[whatwg] getElementsByClassName()
Anne van Kesteren
fora at annevankesteren.nl
Sun Sep 4 09:51:43 PDT 2005
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/>
More information about the whatwg
mailing list