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

Function setTextContent

code/styling/public/app.js:14851–14861  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14849 * @internal
14850 */
14851var setTextContent = function (node, text) {
14852 if (text) {
14853 var firstChild = node.firstChild;
14854
14855 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14856 firstChild.nodeValue = text;
14857 return;
14858 }
14859 }
14860 node.textContent = text;
14861};
14862
14863/**
14864 * 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