org.w3c.dom.Element.setIdAttributeNS
method
public setIdAttributeNS(namespaceURI as String, localName as String, isId as Boolean) as Void throws DOMException
Description

Marks a namespace-aware attribute as an identifier attribute.

Parameters
ParameterDescription
namespaceURINamespace URI.
localNameAttribute local name.
isIdTrue when the attribute should be treated as an identifier.
Throws
  • DOMException if the attribute does not exist.
Example
element.setIdAttributeNS(null, "id", true)