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

Function setTextContent

code/one-direction-data-flow/public/app.js:14724–14734  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14722 * @internal
14723 */
14724var setTextContent = function (node, text) {
14725 if (text) {
14726 var firstChild = node.firstChild;
14727
14728 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14729 firstChild.nodeValue = text;
14730 return;
14731 }
14732 }
14733 node.textContent = text;
14734};
14735
14736/**
14737 * 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