MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / setTextContent

Function setTextContent

code/composition/public/app.js:14989–14999  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14987 * @internal
14988 */
14989var setTextContent = function (node, text) {
14990 if (text) {
14991 var firstChild = node.firstChild;
14992
14993 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14994 firstChild.nodeValue = text;
14995 return;
14996 }
14997 }
14998 node.textContent = text;
14999};
15000
15001/**
15002 * CSS properties which accept numbers but are not in units of "px".

Callers 3

setInitialDOMPropertiesFunction · 0.70
updateDOMPropertiesFunction · 0.70
app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected