Re: Why not Node.insertAfter()?

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