- From: Rajiv Mordani <mode@rocketmail.com>
- Date: Thu, 7 Jan 1999 14:43:54 -0500 (EST)
- To: www-dom@w3.org
- Cc: mode@rocketmail.com
Subject: Clarification needed regarding the DOM Level 1 specification. This is with regards to the DOM Level 1 specification that has been published on October 1 1998. In the NamedNodeMap there is a method called removeNamedItem which is described in the document as follows: removeNamedItem Removes a node specified by name. If the removed node is an Attr with a default value it is immediately replaced. Parameters name The name of a node to remove. Return Value The node removed from the map or null if no node with such a name exists. Exceptions DOMException NOT_FOUND_ERR: Raised if there is no node named name in the map. In the method above it is observed that the return value is'null' if no node with such a name exists and immediately after it is the exceptions raised which has DOMException raised if there is no node named 'name' in the NamedNodeMap. It is unclear what should be the right thing to do here, that is throw an exception or return value null incase the node isn't present in the NamedNodeMap. In most of the cases in the DOM level 1 specification in such situations the return value is null and the exceptions that are raised is NO_MODIFICATION_ALLOWED_ERR. Shouldn't the same apply to this method also? Need clarification regarding this. Regards Rajiv _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com
Received on Friday, 8 January 1999 03:38:59 UTC