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

DOM Core Level 1, Node.replaceChild

From: <Hasko.Heinecke@ifs-gmbh.de>
Date: Mon, 7 Sep 1998 11:14:16 -0400 (EDT)
Message-ID: <813D90EEB732D211878800A0244B6D540B6C9A@mail.ess.ifs-gmbh.de>
To: www-dom@w3.org
Dear Editor,

I would suggest the following small change to the Node interface:

	Node replaceChild(in Node newChild, in Node refChild) raises

should be changed to 

	Node replaceChildWith(in Node refChild, in Node newChild) raises

This way, the method name already suggests the right ordering of the
attributes, i.e. the replaced child before the new child. This might prevent
confusion when reading code that uses the DOM. Also, this naming scheme can
be better represented in programming languages that use infix notation, like
Smalltalk. You'd write this as

	replaceChild: oldChild with: newChild

in Smalltalk.


Hasko Heinecke
Received on Friday, 25 September 1998 11:08:40 UTC

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