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

Asymmetry

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
unnecessarily?

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

Thanks

-John
Received on Wednesday, 1 November 2000 10:19:04 GMT

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