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:41:09 +0000
Message-ID: <43E5E455.6070502@cam.ac.uk>
Jim Ley wrote:
> On 2/5/06, James Graham <jg307 at cam.ac.uk> wrote:
>> 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.
> "in practice" isn't really good enough for a specification any more,
> it was when HTML 4.01 or DOM 1 or DOM 2 or CSS 1 or CSS 2 came out, it
> is no longer, and specifications are actually getting proper reviews
> now.

If it really is unspecified in HTML (even though a DOM is constructed) a 
reasonable specification could be derived from the Mozilla behavior. 
That is approximately the path that has been taken with <canvas> 
(Safari), XMLHttpRequest (IE), HTML parsing (Mozilla, Safari, Opera) and 
so on. Indeed firming up the specification of useful, implemented, 
behaviors is one of the aims of the WHATWG.
Received on Sunday, 5 February 2006 03:41:09 UTC

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