Programmer's Guide > Interfaces > W3C Element interface > setIdAttributeNode method
  
setIdAttributeNode method
If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute. This affects the value of Attr.isId and the behavior of Document.getElementById, but does not change any schema that may be in use, in particular this does not affect the Attr.schemaTypeInfo of the specified Attr node. Use the value false for the parameter isId to undeclare an attribute for being a user-determined ID attribute.
setIdAttributeNode(idAttr, isId)
Parameters
AttridAttr
The attribute node.
booleanisId
Whether the attribute is a of type ID.
Returns
void
Throws
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if the specified node is not an attribute of this element.