MCPcopy Create free account
hub / github.com/microsoft/SandDance / addChild

Function addChild

docs/app/js/sanddance-app.js:6685–6690  ·  view source on GitHub ↗
(parentElement, child)

Source from the content-addressed store, hash-verified

6683 return arr.join(";");
6684}
6685function addChild(parentElement, child) {
6686 if (child === null || child === undefined || typeof child === "boolean") return;
6687 else if (Array.isArray(child)) appendChildren(parentElement, child);
6688 else if (isElement(child)) parentElement.appendChild(child);
6689 else parentElement.appendChild(document.createTextNode(child.toString()));
6690}
6691function appendChildren(parentElement, children) {
6692 children.forEach((child)=>addChild(parentElement, child));
6693}

Callers 2

appendChildrenFunction · 0.70
mountFunction · 0.70

Calls 3

appendChildrenFunction · 0.70
isElementFunction · 0.70
toStringMethod · 0.45

Tested by

no test coverage detected