HTMLHtmlElement.AppendChild

Syntax:

AppendChild(<NewNode>)

Parameters:

<NewNode> (required)

Type: HTMLHtmlElement.
A new child HTMLDOM node.

Returned value:

Type: HTMLHtmlElement.

Description:

Adds a node into the child node list; if the node in already included into the document tree, it is first deleted from the previous location.
If the node is DocumentFragment, all the fragment contents is added into the child node list.

Availability:

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

Note:

An exception is triggered:
  • if this node does not allow a node to be added as a child node, or the added node is one of its parents, or the node is added to itself, or this node is Document and the second node is DocumentType or Element;
  • if the added node is created by a document different from the document that has created this node;
  • if this node is read-only or the previous parent of the added node is read-only;
  • if the added node is a child of the Document node, and the implementation does not support deletion of DocumentType and Element nodes of the Document node.

    

1C:Enterprise Developer's Community