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

[whatwg] getElementsByClassName()

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 05 Sep 2005 23:50:08 +1000
Message-ID: <431C4D10.6000405@lachy.id.au>
Jim Ley wrote:
> On 9/5/05, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
>>I may not be understanding what you mean, but if optional parameters
>>aren't language independant, shouldn't it be defined in a more language
>>independant way, so that any non-ECMAScript languages can still
>>implement this?
> Yes, DOM currently is language agnostic, however the optional
> className parameters aren't compatible with languages which can't do
> that.  So as defined now getElementsByClassName would not manage to do
> that.

In that case, should it be redefined as:

   NodeList getElementsByClassName(in DOMString classNames);

where classNames is a string of space separated class names?  That would 
be just as easy to implement and would work with languages that don't 
support optional parameters.

Lachlan Hunt
Received on Monday, 5 September 2005 06:50:08 UTC

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