org.w3c.dom.Element.setIdAttribute
method
public setIdAttribute(name as String, isId as Boolean) as Void throws DOMException
Description

Marks an attribute as an identifier attribute.

Parameters
ParameterDescription
nameAttribute qualified name.
isIdTrue when the attribute should be treated as an identifier.
Throws
  • DOMException if the attribute does not exist.
Example
element.setIdAttribute("id", true)