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

[whatwg] getElementsByClassName()

From: James Graham <jg307@cam.ac.uk>
Date: Sun, 05 Feb 2006 11:06:17 +0000
Message-ID: <43E5DC29.5050502@cam.ac.uk>
Jim Ley wrote:
> On 2/5/06, James Graham <jg307 at cam.ac.uk> wrote:
> DOM 3 XPath is of course only defined for XML, whilst it's no trouble
> defining it for valid HTML, it's not currently, for this reason I
> would prefer just having a CSSSelector method and not bothering with
> an XPath one, defining XPath for HTML is a bit of a pain - indeed I'm
> not completely confident it's possible on an invalid HTML document
> until after the document has finished loading.

In practice it works fine in Mozilla for HTML which, given it's DOM 
functionality, isn't so surprising since both XML and HTML end up 
constructing a DOM.

>> I do however know that arguing "we shouldn't implement feature x because
>> more complex features y and z provide a superset of x's features" is
>> wrong if a cost benefit analysis shows that x is better "value for
>> complexity" than y or z.
> 
> Of course it should!  but remember also the cost of not doing x is
> relevant, and the likelyhood of y or z being implemented anyway.  
> There's little point in requiring feature x be implemented if feature
> y and z are being implemented anyway, that's just bloat.

Unless x offers significant simplicity for end users (i.e. script 
authors) above y and z. In this case that's probably not true but it's 
also not entirely clear that getElementsByCSSSelector will be 
standardized and implemented any time soon (especially if it is punted 
to the CSS WG).
Received on Sunday, 5 February 2006 03:06:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:26 UTC