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
DOMException;

should be changed to 

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

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.

Regards,

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

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