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

Comment on NodeList and NamedNodeMap

From: Don Hamson <donh@xyvision.com>
Date: Wed, 7 Oct 1998 18:15:06 -0400 (EDT)
To: <www-dom@w3.org>
Message-Id: <003201bdf215$2fc003f0$dd3004c6@mohawk.xyvision.com>
Hi,

   From your latest version of the DOM level 1 spec, the idl for NodeList
and NamedNodeMap overlap for NodeList methods.  You specify that
NamedNodeMap doesn't inherit from NodeList...

    This replicates method signatures for potentially the same collection
with no requirement for semantic differences or similarities.  Would you
make our world a bit easier to program in by dropping "item" and "length"
from NamedNodeMap; or make them inherit so that they behave the same
semanticly? I like removing them from NamedNodeMap or removing NodeList -
less is better. This might keep us from having to special case particular
vendors; or remember which interface we're using for these methods.  Thanks.

Don Hamson
Bartlett Consulting LLC
Nashua, NH
dbh@tiac.net


interface NodeList
{
	Node item(in unsigned long index);
	readonly attribute unsigned long length;
};

interface NamedNodeMap
{
	Node getNamedItem(in DOMString name);
	Node setNamedItem(in Node arg) raises(DOMException);
	Node removeNamedItem(in DOMString name)raises(DOMException);
	Node item(in unsigned long index);
	readonly attribute unsigned long length;
};
Received on Thursday, 8 October 1998 08:16:38 GMT

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