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

Function setTextContent

code/third-party/public/app.js:14084–14094  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14082 * @internal
14083 */
14084var setTextContent = function (node, text) {
14085 if (text) {
14086 var firstChild = node.firstChild;
14087
14088 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14089 firstChild.nodeValue = text;
14090 return;
14091 }
14092 }
14093 node.textContent = text;
14094};
14095
14096/**
14097 * 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