[whatwg] [WA1] getElementsByClass

On Thu, 26 Aug 2004, Mark Schenk wrote:
>
> I'm very happy to see the getElementsByClass() method introduced in WA1, 
> that is definitely something missing from current DOM specs. However, 
> there seems to be no way defined for selecting elements with multiple 
> class names.
> 
> <div class="green" />
> <div class="green car" />
> <div class="car green" />
> <div class="car green british" />
> 
> What happens if I want to select all elements with class="car green" 
> (and that selection should include the equivalent class="green car")? 
> That is currently undefined. And let's assume that this was implemented 
> and if I were to search for getElementsByClass("car green") would it 
> also select the fourth one? Or should it only select completely matching 
> classes?

I've changed the definition a little. Is it more to your liking?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Sunday, 29 August 2004 10:04:59 UTC