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

[whatwg] getElementsByClassName() idea

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Sun, 05 Nov 2006 10:33:00 +0100
Message-ID: <op.tijd5asnaw9dld@id-c0020>
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")'


* The examples use a mix of accepting arrays and strings. This should be  
fixed I assume.

* In "HTML, XHTML, SVG and MathML elements" you can drop XHTML as it's  
clearly defined in the specification what HTML elements means.

Anne van Kesteren
Received on Sunday, 5 November 2006 01:33:00 UTC

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