om.DomNode.createChild

Creates and adds a node at the end of the list of children in the current node.

Syntax

createChild(
   tagName STRING )
  RETURNS om.DomNode
  1. tagName is the tag name of the new node.

Usage

The createChild() method creates a new om.DomNode element with the tag name passed as parameter, and adds it at the end of the children of the object node calling the method.

The method returns the reference to the created object.

Example

DEFINE parent, child om.DomNode
...
LET child = parent.createChild("Item")

For a complete example, see Example 1: Creating a DOM tree.