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

RE: HTMLTableElement.insertRow()

From: Miles Sabin <msabin@cromwellmedia.co.uk>
Date: Thu, 8 Oct 1998 14:36:58 +0100
Message-ID: <c=US%a=_%p=Cromwell_Media%l=ODIN-981008133658Z-11420@odin.cromwellmedia.co.uk>
To: "'Don Park'" <donpark@quake.net>, "'www-dom@w3.org'" <www-dom@w3.org>
Don Park wrote,

> My understanding is that
> 
>     fruitable.insertRow(1)
> 
> is equivalent to
> 
>     fruitable.insertBefore(
>         fruitable.getOwnerDocument().createElement("tr"),
>         fruitable.getChildNodes().item(1))
> 
> so I think you are correct.

In the light of a previous reply to a query of mine on TBODY,
this can't be right. Something more like,

  Node next = fruitable.rows().item(1);
  next.getParentNode().insertBefore(newRow, next);

would seem appropriate, allowing for TR elements being nested
within THEAD, TFOOT or TBODY.

Cheers,


Miles

-- 
Miles Sabin                          Cromwell Media
Internet Systems Architect           5/6 Glenthorne Mews
+44 (0)181 410 2230                  London, W6 0LJ
msabin@cromwellmedia.co.uk           England
Received on Thursday, 8 October 1998 09:41:26 GMT

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