Creates a new Element with arguments as childs.
@param {string|object} config CSS-selector like definition or object for extended Element creation.
@param {...Node|object} children Child nodes
@return {!Element} The new Element.
161145
function createElement(config){
    var isConfig = config != undefined && typeof config != 'string';
    var description = (isConfig ? config.description : config) || '';

    var elementName = 'div'; // modern browsers become case sensetive for tag names for xhtml
    var element;

    // fetch tag name
    var m = description.match(/^([a-z0-9_\-]+)(.*)$/i);
    if (m)
    {
      elementName = m[1];
      description = m[2];
    }

    // create an element

    if (description != '')
    {
      // extract properties
      var classNames = [];
      var attributes = {};
      var entryName;

      while (m = DESCRIPTION_PART_REGEXP.exec(description))
      {
        if (m[8])
        {
          throw new Error(
            'Create element error in basis.dom.createElement()' +
            '\n\nDescription:\n> ' + description +
            '\n\nProblem place:\n> ' + description.substr(0, m.index) + '-->' + description.substr(m.index) + '<--'
          );
        }

        entryName = m[1] || m[2] || m[3];

        if (m[1])     // id
          attributes.id = entryName;
        else
          if (m[2])   // class
            classNames.push(entryName);
          else
          {           // attribute
            if (entryName != 'class')
              attributes[entryName] = m[4] ? m[5] || m[6] || m[7] || '' : entryName;
          }
      }

      // create element
      if (IS_ATTRIBUTE_BUG_NAME && attributes.name && /^(input|textarea|select)$/i.test(elementName))
        elementName = '<' + elementName + ' name=' + attributes.name + '>';
    }

    // create element
    element = document.createElement(elementName);

    // set attributes
    if (attributes)
    {
      if (attributes.style && IS_ATTRIBUTE_BUG_STYLE)
        element.style.cssText = attributes.style;

      for (var attrName in attributes)
        element.setAttribute(attrName, attributes[attrName], 0);
    }

    // set css classes
    if (classNames && classNames.length)
      element.className = classNames.join(' ');

    // append child nodes
    if (arguments.length > 1)
      handleInsert(element, createFragment.apply(0, basis.array.flatten(arrayFrom(arguments, 1))));

    // attach event handlers
    if (isConfig)
    {
      if (config.css)
      {
        if (!cssom)
          cssom = require('basis.cssom');
        cssom.setStyle(element, config.css);
      }

      for (var event in config)
        if (typeof config[event] == 'function')
          eventUtils.addHandler(element, event, config[event], element);
    }

    // return an element
    return element;
  }
67833
private void addChildElements() {
		for (Node node : nodes) {
			Collection<? extends Node> childNodes = helper.getChildNodes(node);
			for (Node child : childNodes)
				if (matchTag(child))
					result.add(child);
		}
	}
500052
function(childNode) {
        if (this.hasChildren()) {
            var sib = this.children[this.children.length - 1];
            sib.nextSibling = childNode;
            childNode.previousSibling = sib;
        }
        this.children[this.children.length] = childNode;
        childNode.applyParent(this);

        // part of the IE display issue workaround. If child nodes
        // are added after the initial render, and the node was
        // instantiated with expanded = true, we need to show the
        // children div now that the node has a child.
        if (this.childrenRendered && this.expanded) {
            this.getChildrenEl().style.display = "";
        }

        return childNode;
    }
648306
def element(self, *args, **kwargs):
        
        child_element = self._element.add_element(*args, **kwargs)
        return Builder(child_element)
614142
function addChildNode(node, tagName) {
    return node.appendChild((node.ownerDocument || node).createElement(tagName));
}
1054755
public Xml createChild(String child)
    {
        Check.notNull(child);

        final Element element = document.createElement(child);
        root.appendChild(element);
        return new Xml(document, element);
    }
708490
function Node(config) {
    RED.nodes.createNode(this,config);
    var node = this,
      message = '';

    this.on('input', function (msg) {
      node.status({});

      payloadCheck(msg)
      .then(function(){
        return wordcountCheck(msg, config);
      })
      .then(function(){
        return credentialsCheck(node);
      })
      .then(function(){
        return setEndPoint(config);
      })
      .then(function(){
        return prepareParams(msg, config);
      })
      .then(function(params){

        node.status({fill:'blue', shape:'dot', text:'requesting'});
        return executeService(msg, params);
      })
      .then(function(){
        node.status({});
        node.send(msg);
      })
      .catch(function(err){
        payloadutils.reportError(node, msg, err);
        node.send(msg);
      });
    });
  }
1039969
function(child) {
        child = child.get ? child.get('element') : child;
        return this.get('element').appendChild(child);
    }
414341
function (polygons) {
    // new polygons can only be added to root node; children can only be splitted polygons
    if (!this.isRootNode()) {
      throw new Error('Assertion failed')
    }
    let _this = this
    polygons.map(function (polygon) {
      _this.addChild(polygon)
    })
  }
28340
function(s) {
				var e = document.createElement("div");
				e.innerHTML = s;
				return e.childNodes.length === 0
					? ""
					: e.childNodes[0].nodeValue;
			}
868585
function (nodes, children) {
	transcluder.find(nodes);

	for (var i = 0; i < children.length; ++i) {
		transcluder.add_node(children[i]);
	}

	transcluder.transclude();
}
545682
public Element appendChild(Node child) {
        Validate.notNull(child);

        // was - Node#addChildren(child). short-circuits an array create and a loop.
        reparentChild(child);
        ensureChildNodes();
        childNodes.add(child);
        child.setSiblingIndex(childNodes.size() - 1);
        return this;
    }
1079065
function(children, options){
			children = (children || []).slice(0).sort(sortChildren);
			var res = "";
			children.forEach(function(child){
				res += options.fn(child)
			});
			return res;
		}
105165
function(data){
	var container = document.createElement(data.childTag);
	data.nodes.forEach(function(node){
		container.appendChild(renderNodeTarget.hydrate({node: node, childTag: data.childTag}));
	});
	return container;
}
1060641
function () {
            var self = this;
            if (!self.isChildrenFiltered) {
                var writer = new (module.require('html-parser/writer/basic'))();
                self._writeChildrenHTML(writer);
                var parser = new (module.require('html-parser/parser'))(writer.getHtml()), children = parser.parse().childNodes;
                self.empty();
                util.each(children, function (c) {
                    self.appendChild(c);
                });
                self.isChildrenFiltered = 1;
            }
        }
493031
function addChild(data) {
                var child = new TreeNode(data, this);
                if (!this.children) {
                    this.children = [];
                }
                this.children.push(child);
                return child;
            }
1140141
function insert (parent, children) {
  if (!parent || !children) {
    return
  }
  let nodes = Array.prototype.slice.call(children)
  if (nodes.length === 0) {
    nodes.push(children)
  }
  for (let i = 0; i < nodes.length; i++) {
    if (this.contains(nodes[i], parent)) {
      continue
    }
    if (nodes[i] !== parent && parent.appendChild) {
      parent.appendChild(nodes[i])
    }
  }
}