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. David FlanaganReceived on Thursday, 26 July 2001 19:55:51 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:49 GMT