[whatwg] getElementsByClassName()

Ian Hickson ian at hixie.ch
Sun Feb 5 14:56:29 PST 2006


On Sun, 5 Feb 2006, Lachlan Hunt wrote:
> > > 
> > > Ian has already indicated that the specification of a method to 
> > > collect DOM elements based on a CSS selector is best left to the CSS 
> > > WG.
> 
> I'd like to know why this is the case.  Defining a DOM method seems like 
> it would be out of scope for the CSS working group and seems to be in 
> the scope of the WHATWG.  Other than that, it could be left up the the 
> DOM WG or possibly the Web API WG although it doesn't quite fit anything 
> anything mentioned in their charter.

Probably doesn't matter which group does it since it'd end up being me 
doing the work either way... At the time where I made that comment, the 
CSSWG was planning on creating a CSSOM spec to replace the DOM2 CSS spec. 
That plan still vaguely exists, though it isn't a high priority for the 
CSS group.

I can certainly see myself speccing a getElementsBySelector() API as part 
of Selectors 2. But either way, the spec for gEBS is simple; it returns 
the same type as getElementsByTagName(), it is accessible from Document 
and Element nodes and selects a subset of the descendants of that node, it 
takes a single argument (a string representing a selector), its first 
version doesn't support namespaces, and it raises an exception SYNTAX_ERR 
if the string can't be successfully parsed by the UA.

-- 
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