Owning interface and usage:
Member of these other interfaces :
Adds a new attribute. If an attribute with that name is already present in the element, it is replaced by the new one.
||The Attr node to add to the attribute list.
If the newAttr attribute replaces an existing attribute with the same name, the previously existing Attr node is returned, otherwise null is returned.
- DOMException WRONG_DOCUMENT_ERR
- Raised if newAttr was created from a different document than the one that created the element.
- DOMException NO_MODIFICATION_ALLOWED_ERR
- Raised if this node is readonly.
- DOMException INUSE_ATTRIBUTE_ERR
- Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.