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

Function setTextContent

code/dependency-injection/public/app.js:14944–14954  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14942 * @internal
14943 */
14944var setTextContent = function (node, text) {
14945 if (text) {
14946 var firstChild = node.firstChild;
14947
14948 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14949 firstChild.nodeValue = text;
14950 return;
14951 }
14952 }
14953 node.textContent = text;
14954};
14955
14956/**
14957 * 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