HTMLDivElement.SetAttributeNode

Syntax:

SetAttributeNode(<NewAttribute>)

Parameters:

<NewAttribute> (required)

Type: HTMLAttribute.
The set HTMLDOM attribute.

Returned value:

Type: HTMLAttribute; 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:

Thin client, server, thick client, external connection, Mobile application (client), 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