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

Function setTextContent

code/higher-order-components/public/app.js:14845–14855  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14843 * @internal
14844 */
14845var setTextContent = function (node, text) {
14846 if (text) {
14847 var firstChild = node.firstChild;
14848
14849 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14850 firstChild.nodeValue = text;
14851 return;
14852 }
14853 }
14854 node.textContent = text;
14855};
14856
14857/**
14858 * 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