[whatwg] getElementsByClassName() idea

Anne van Kesteren fora at annevankesteren.nl
Sun Nov 5 02:18:32 PST 2006


On Sun, 05 Nov 2006 10:55:05 +0100, Alexey Feldgendler  
<alexey at feldgendler.ru> wrote:
>> I think this hasn't been suggested before. Perhaps the method should
>> accept a DOMTokenString as argument instead of an array. This allows
>> things like ele.getElementsByClassName(ele.className) etc. The only
>> problem is how to get a DOMTokenString without first getting .className
>>  from somewhere. Perhaps it should be a constructor as well. 'x = new
>> DOMTokenString("aaa bbb")'
>
> How is it better than DOMString?

It inherits from DOMString.  
http://www.whatwg.org/specs/web-apps/current-work/#domtokenstring defines  
it.


Hixie, the title attribute of the remove(token) definition says  
dom-tokenstring-add rather than dom-tokenstring-remove...


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>



More information about the whatwg mailing list