W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

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

From: Philippe Le Hegaret <plh@w3.org>
Date: Mon, 10 Sep 2001 15:36:33 -0400
Message-ID: <3B9D1641.1701DB8C@w3.org>
To: www-dom@w3.org
Cc: David Flanagan <david@oreilly.com>
> 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 GMT

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