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


From: John Ky <hand@syd.speednet.com.au>
Date: Thu, 2 Nov 2000 02:17:56 +1100
Message-ID: <006701c04416$eab73b60$2400a8c0@NEWHOGGY>
To: <www-dom@w3.org>
Just an innocent question that may have been
asked before - but one I can't keep myself
from asking.

Why are the insertion methods asymmetric?

There is an appendChild, but no prependChild.
There is an insertBefore, but no insertAfter.

I know it is possible to insertAfter and
prependChild with a little more work with the
existing interfaces at a negligible performance
penalties but why put users through that

It happened to occur to me when I wrote
some code that needed to use the complementary


Received on Wednesday, 1 November 2000 10:19:04 UTC

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