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 GMT

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