org.w3c.dom.Element.setAttributeNode
method
public setAttributeNode(newAttr as Attr) as Attr throws DOMException
Description

Adds or replaces an attribute node.

Parameters
  • newAttr Attribute node.
Returns

Previous attribute node, or null.

Throws
  • DOMException if the attribute cannot be attached.
Example
old = element.setAttributeNode(attr)