W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

Re: Why not Node.insertAfter()?

From: <keshlam@us.ibm.com>
Date: Wed, 8 Mar 2000 11:49:27 -0500
To: Eric Richardson <maxwell@telesoft.com>
cc: DOM <www-dom@w3.org>
Message-ID: <8525689C.005C68E4.00@D51MTA03.pok.ibm.com>
node.insertAfter(newKid,refChild), if it existed, would be precisely
equivalent to node.insertBefore(newKid,refChild.getNextSibling()).

Note that inserting before null means inserting at the end of the list, so
the Right Thing should happen even in that case.  Also note that a
shorthand in that case is node.appendChild(newKid).

So insertAfter might be convenient, but isn't strictly necessary. Which is
why we left it out of Level 1.
Joe Kesselman  / IBM Research
Received on Wednesday, 8 March 2000 11:49:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC