[whatwg] getElementsByClassName()

Erik Arvidsson erik at eae.net
Sun Sep 4 11:54:52 PDT 2005


Kornel Lesinski 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.

For multiple classes it makes more sense to use:

el.getElementsBySelector(".foo.bar")

erik



More information about the whatwg mailing list