Re: ISSUE-6 (Element Traversal Nodelist): Should the ElementTraversal Interface Have a Nodelist? [Element Traversal]

Web Applications Working Group Issue Tracker wrote:
> ISSUE-6 (Element Traversal Nodelist): Should the ElementTraversal Interface Have a Nodelist? [Element Traversal]
> 
> http://www.w3.org/2008/webapps/track/issues/
> 
> Raised by: Doug Schepers
> On product: Element Traversal
> 
> Daniel Glazman requested that a nodelist or item accessor be added to
> the ET spec, in
> <http://lists.w3.org/Archives/Public/public-webapi/2008Mar/0226.html>,
> spawning a long thread.
> 
> Doug discussed the history of similar proposals, from himself,
> Mozilla, and others in
> <http://lists.w3.org/Archives/Public/public-webapi/2008Mar/0246.html>.
> 
> On the plus side, it would allow for discrete access to elements in
> some use cases, and would be easy to implement for UAs that already
> have a nodelist implementation.  On the downside, it is heavier to
> implement if the UA doesn't already have nodelist (such as some mobile
> uses), and ET is already referenced by other specifications.

One thing that I recently realized. Any UA that implements the HTML DOM 
must already have the code to implement a live nodelist of child 
elements with a given name. This is needed to implement the 
HTMLTableElement.rows, HTMLTableElement.tBodies and 
HTMLTableRowElement.cells properties.

So it seems like it should be easy to reuse that code to implement a 
.childElements list. That is exactly what the implementation in mozilla 
would do.

/ Jonas

Received on Tuesday, 17 June 2008 23:21:46 UTC