Re: Element.removeAttribute() with a non-existent attribute name

> Date: Thu, 26 Jul 2001 16:00:44 -0700
> Message-Id: <200107262300.QAA01503@oxymoron.oreilly.com>
> From: David Flanagan <david@oreilly.com>
> Subject: Element.removeAttribute() with a non-existent attribute name
> 
> Neither the Level 2 DOM specification, nor the errata of that
> specification seem to specify what should happen if you call
> Element.removeAttribute() and pass the name of a non-existent attribute.
> Since the spec does not say that an exception is thrown in this case,
> I'd assume that the call is simply ignored.  On the other hand,
> removeAttributeNode() throws an exception if the specified Attr node is
> not found, and I wan't to be sure that removeAttribute() was not
> intended to do the same thing.
> 
> Can anyone confirm that my assumption (i.e. ignore non-existent
> attributes) is correct?
> 
> Finally, I'd be more comfortable with the spec. if this were formally
> clarified for removeAttribute() and removeAttributeNS() in an erratum.

Fixed. See
http://www.w3.org/2000/11/DOM-Level-2-errata#core-19


Thank you,
Philippe

Received on Monday, 10 September 2001 15:36:38 UTC