W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] getElementsByClassName() idea

From: Alexey Feldgendler <alexey@feldgendler.ru>
Date: Sun, 05 Nov 2006 19:27:14 +0600
Message-ID: <op.tijozo2a1h6og4@feldgendler.plesk.ru>
On Sun, 05 Nov 2006 16:18:32 +0600, Anne van Kesteren <fora at annevankesteren.nl> 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.

I still don't get it what's the advantage of having getElementsByClassName take a DOMTokenString argument over a plain DOMString.


-- 
Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com
Received on Sunday, 5 November 2006 05:27:14 UTC

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