- From: Mihai Sucan <mihai.sucan@gmail.com>
- Date: Wed, 22 Aug 2007 23:49:43 +0300
- To: "Boris Zbarsky" <bzbarsky@mit.edu>
- Cc: public-html <public-html@w3.org>
Hello Boris! Le Wed, 22 Aug 2007 23:05:18 +0300, Boris Zbarsky <bzbarsky@mit.edu> a écrit: > 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: Perhaps you are making a confusion. I have only quoted the paragraphs from the spec, adding emphasis with *asterisk* where there's an error. Please take a look into the spec and see. Hixie made an error saying in a paragraph "rowIndex element". There's no "rowIndex" element, there's only a rowIndex DOM attribute. In the next paragraph he *seems* to have mistaken sectionRowIndex with rowIndex (based on the definition). > 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. It's not my definition. Please take a look at the spec. >> 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? Yes, that's somewhat confusing. Returning -1 would be better. I wanted to add a point about this issue, but I forgot. -- http://www.robodesign.ro
Received on Wednesday, 22 August 2007 20:49:54 UTC