Comment on NodeList and NamedNodeMap

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 UTC