Re: Review of 3.15.1. The table element

Mihai Sucan wrote:
> The *rowIndex* DOM attribute must, if the element has a parent table, 
> tbody, thead, or tfoot element, return the index of the tr element in 
> the parent element's rows collection (for tables, that's the rows 
> collection; for table sections, that's the rows collection).

This is a little confusing... The DOM2 HTML definition is:

   This is in logical order and not in document order. The rowIndex does take
   into account sections (THEAD, TFOOT, or TBODY) within the table, placing
   THEAD rows first in the index, followed by TBODY rows, followed by TFOOT rows.

In other words, rowIndex is the index in the table's .rows.  That's not what 
your text above says.

> If there is no such parent element, then the attribute must return 0."

Are we sure?  That makes it impossible to tell that case apart from the case 
when this is in fact the first row.  Would -1 make more sense?

-Boris

Received on Wednesday, 22 August 2007 20:05:40 UTC