- From: Joseph Kesselman <keshlam@us.ibm.com>
- Date: Mon, 5 Feb 2001 17:10:43 -0500
- To: "Daniel Lobo Veiga" <dveiga@inescporto.pt>
- Cc: "DOM" <www-dom@w3.org>
Yes, you can use either element.getAttributes().removeNamedItem() or element.removeAttribute(). Their return values (or exceptions) are as shown in the spec; if you have a preference about what happens when you ask for an attribute that doesn't exist,, use the call that gives you the behavior you prefer. In some DOMs, removeAttribute() may be more efficient. Remember that there are also namespace-aware versions of both these calls, which may be a wiser choice for modern applications. ______________________________________ Joe Kesselman / IBM Research
Received on Monday, 5 February 2001 17:11:26 UTC