org.w3c.dom.Element.setAttribute
method
public setAttribute(name as String, value as String) as Void throws DOMException
Description

Sets or creates an attribute by name.

Parameters
  • name Attribute qualified name.
  • value Attribute value.
Throws
  • DOMException if the attribute cannot be set.
Example
element.setAttribute("id", "42")