W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

Node.insertBefore and null refChild - suggestion

From: Tomasz J. Kotarba <kotarba@iceguard.net>
Date: 29 Sep 2002 23:04:22 +0200
To: www-dom@w3.org
Message-Id: <1033333463.3765.31.camel@durand.joint.eu.org>

The specification says:

---
insertBefore
  ... If refChild is null, insert newChild at the END of the list of
children.
-----

IMHO a more logical, elegant and practical approach would be to change
that to:

---
insertBefore
  ... If refChild is null, insert newChild at the BEGINNING of the list
of children.
-----

Why? The method is called insertBEFORE, and we have appendChild to add a
child at the end of the list of children. What do you think about it?
Received on Sunday, 29 September 2002 17:05:07 GMT

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