Adds a new attribute. If an attribute with that local name and that
 namespace URI is already present in the element, it is replaced by
 the new one. Replacing an attribute node by itself has no effect.
 
Per [XML Namespaces]
 , applications must use the value null as the
 namespaceURI parameter for methods if they wish to have
 no namespace.
| newAttr | The Attrnode to add to the attribute list. | 
newAttr attribute replaces an existing
   attribute with the same local name and namespace URI, the replaced
   Attr node is returned, otherwise null is
   returned.
| DOMException
 | WRONG_DOCUMENT_ERR: Raised if newAttrwas created from a
   different document than the one that created the element.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttris already an
   attribute of anotherElementobject. The DOM user must
   explicitly cloneAttrnodes to re-use them in other
   elements.NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML"and the language exposed
   through the Document does not support XML Namespaces (such as [HTML 4.01]). | 
Diagram: Node