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

[whatwg] getElementsByClassName()

From: Erik Arvidsson <erik@eae.net>
Date: Sun, 04 Sep 2005 20:54:52 +0200
Message-ID: <431B42FC.8030402@eae.net>
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
Received on Sunday, 4 September 2005 11:54:52 UTC

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