append

@param {Object} element
@param {*}      content

@return undefined
960325
function append(element, content) {
  if (isElement(content)) {
    element.appendChild(content);
  } else {
    const div = document.createElement('div');
    div.innerHTML = content || '';

    while (div.firstChild) {
      element.appendChild(div.firstChild);
    }
  }
}
1151472
func (htmlDoc *htmlDocument) append(e element) {
	htmlDoc.elements = append(htmlDoc.elements, e)
}
766102
def append(self, parent, content):
        
        log.debug('appending parent:\n%s\ncontent:\n%s', parent, content)
        if self.start(content):
            self.appender.append(parent, content)
            self.end(parent, content)
1141456
function insertContentIntoPlaceholder(node, content) {
	const state = {replaced: false};

	node.value = replacePlaceholder(node.value, content, state);
	node.attributes.forEach(attr => {
		if (attr.value) {
			node.setAttribute(attr.name, replacePlaceholder(attr.value, content, state));
		}
	});

	return state.replaced;
}
572724
public function append($name, $content = null)
	{
		if (is_array($content)) {
			$first = $this->append($name, $content[0]);
			for ($i = 1; $i < count($content); $i++) {
				$this->append($name, $content[$i]);
			}
			return $first;
		}
		return $this->appendChild($this->newChild($name, $content));
	}
486890
def append_text(self, content):
        
        Core.append_text(self, content)
        known = self.resolver.top().resolved
        content.text = self.translated(content.text, known)
135739
function appendSpy(child) {
        // ignore appending to the node that's not yet added to DOM tree
        if (!this.parentNode) {
            return;
        }

        var destNodePath = phantomas.getDOMPath(this),
            appendedNodePath = phantomas.getDOMPath(child);

        // skip undefined nodes (issue #560)
        if (destNodePath === false) {
            return;
        }

        // don't count elements added to fragments as a DOM inserts (issue #350)
        // DocumentFragment > div[0]
        if (destNodePath.indexOf('DocumentFragment') === 0) {
            return;
        }

        phantomas.incrMetric('DOMinserts');
        phantomas.addOffender('DOMinserts', {append: appendedNodePath, node: destNodePath});

        phantomas.log('DOM insert: node "%s" appended to "%s"', appendedNodePath, destNodePath);
    }
588871
function Element(doc, name, content) {
    if (!doc) {
        throw new Error('document argument required');
    } else if (! (doc instanceof bindings.Document)) {
        throw new Error('document argument must be an ' +
                        'instance of Document');
    } else if (!name) {
        throw new Error('name argument required');
    }

    return new bindings.Element(doc, name, content);
}
781801
function get (element, content) {
    element = document.createElement(element);
    if (element && content) {
      element.innerHTML = content;
    }
    return element;
  }
1154538
public Xml addContent(Content content) {
        if(current == null) {
            throw new XmlModelException("Content can not be attached as root element: " + content.toString());
        }
        content.setParent(current);
        current.addChildElement(content);
        return this;
    }
409426
@SafeVarargs
	public static <T> Object append(Object array, T... newElements) {
		if(isEmpty(array)) {
			return newElements;
		}
		return insert(array, length(array), newElements);
	}
620053
public function append()
    {
        $args = func_get_args();
        foreach ($args as $arg) {
            if ($arg instanceof Element) {
                if ($arg->_used) {
                    continue;
                }
                $arg->_used = true;
            }
            $this->_html[] = $arg;
        }
    }
934215
function appendElementSelector (element, selector) {
  const processor = selectorParser((selectors) => {
    let combinatorNode = null

    /**
     * looping breaks if we insert dynamically
     */
    selectors.each((selector) => {
      const elementNode = selectorParser.tag({ value: element.tag })
      selector.walk((node) => {
        if (node.type === 'combinator') { combinatorNode = node }
      })

      if (combinatorNode) {
        selector.insertAfter(combinatorNode, elementNode)
      } else {
        selector.prepend(elementNode)
      }
    })
  })

  return processor.process(selector).result
}
779641
function append (value, string) {
  if (
    value === null || value === undefined || value === '' ||
    string === null || string === undefined
  ) {
    return value
  }
  return value + string
}
224982
function(html, element) {
      var template = document.createElement('template');
      template.innerHTML = html;
      var fragment = this.instanceTemplate(template);
      if (element) {
        element.textContent = '';
        element.appendChild(fragment);
      }
      return fragment;
    }
638921
public function appendContent($content)
    {
        if (!empty($content)) {
            if (is_array($this->content)) {
                $this->content[] = $content;
            } else {
                $this->content .= $content;
            }
        }
        return $this;
    }
276680
function append() {
  var i, l = this.length, el, args = this.slice.call(arguments);
  function it(node, index) {
    // content elements to insert
    el.each(function(ins) {
      ins = (index < (l - 1)) ? ins.cloneNode(true) : ins;
      node.appendChild(ins);
    });
  }
  for(i = 0;i < args.length;i++) {
    // wrap content
    el = this.air(args[i]);
    // matched parent elements (targets)
    this.each(it);
  }
  return this;
}