DOMElement.SetAttributeNode

Syntax:

SetAttributeNode(<NewAttribute>)

Parameters:

<NewAttribute> (required)

Type: DOMAttribute.
The set DOM attribute.

Returned value:

Type: DOMAttribute; Undefined.
Returns an attribute replaced by the new attribute or Undefined, if the attribute does not exist.

Description:

Sets an attribute to the element. If Local name and Namespace URI values match one of the existing attributes, this attribute is replaced by the new attribute.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

Exception reasons:
  • The attribute node is created by another document;
  • This node is read-only;
  • The set attribute is an attribute node for another Element node, the attribute should be explicitly cloned.

    

1C:Enterprise Developer's Community