Re: Asymmetry

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

Generally, we haven't put in trivial convenience functions (with the
exception of  some stuff that went in for "DOM Level 0" compatability);
there has to be a strong practical reason for adding them. Typically, that
means the promise of substantial performance improvement in a critical
usecase across a reasonably wide range of DOM implementations.

Since insertAfter is easily expressed as insertBefore(nextSibling()), and
prependChild as insertBefore(firstChild()), my current take is that these
fall in the trivial convenience category. (There _may_ be supporting
arguments here regarding optimizing in proxy DOMs, but I'm skeptical.)

Software engineering, not computer science...

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 1 November 2000 11:04:18 UTC