W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: HTMLTableElement.insertRow()

From: John Whelan <whelan@itp.unibe.ch>
Date: Wed, 7 Oct 1998 09:51:15 -0400 (EDT)
Message-Id: <199810071350.PAA03666@itpserver>
To: www-dom@w3.org, msabin@cromwellmedia.co.uk
> According to the spec:
> 
>   insertRow
>     Insert a new empty row in the table. [...]
> 
>     Parameters
>       index      The row number where to insert a new row.

Another question is into which TBODY the row should be inserted, if
the specified index falls on a boundary between table sections.  E.g.,
if the existing table "fruitable" looks like

<table>
  <thead>
    <tr>
       <th>A</th>
       <th>B</th>
    </tr>
  </thead>
  <tbody>
    <tr>
       <th>Apple</th>
       <th>Banana</th>
    </tr>
  </tbody>
</table>

what does fruitable.insertRow(1) do?  My suspicion is that it should
add a row to the TBODY, since there is a Node.insertBefore method and
not Node.insertAfter

And I hesitate to ask this, but is Table.rows supposed to put the rows
from the TFOOT before or after those from the TBODY?  They occur
before in the HTML, but logically should come after in the table.

					John T. Whelan
					whelan@iname.com
					http://www.slack.net/~whelan/
Received on Thursday, 8 October 1998 08:15:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT