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

Function setTextContent

code/redux/public/app.js:15102–15112  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

15100 * @internal
15101 */
15102var setTextContent = function (node, text) {
15103 if (text) {
15104 var firstChild = node.firstChild;
15105
15106 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
15107 firstChild.nodeValue = text;
15108 return;
15109 }
15110 }
15111 node.textContent = text;
15112};
15113
15114/**
15115 * 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