[whatwg] Definitions of DOMTokenList algorithms and element.classList

Ian Hickson ian at hixie.ch
Sun Jul 12 20:16:19 PDT 2009

On Mon, 15 Jun 2009, Adam Roben wrote:
> Step 3 of the algorithm for DOMTokenList.has says:
> > If the token indicated by token is one of the tokens in the object's
> > underlying string then return true and stop this algorithm.
> What does "token is one of the tokens" mean? I assume it means that a 
> case-sensitive string comparison of token with each of the tokens in the 
> DOMTokenList yields one match. It might be good to clarify this in the 
> spec. Note that the algorithms for DOMTokenList.add and 
> DOMTokenList.toggle use similar wording.


> Should methods of element.classList treat their arguments 
> case-insensitively in quirks mode? I think they should. This should be 
> mentioned in the spec.

I've clarified that DOMTokenList is always case-sensitive. We don't want 
to be adding more quirk-mode behaviours. Using quirks mode is not 
conforming (i.e. it's not a supported behaviour).

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

More information about the whatwg mailing list