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

Function setTextContent

code/communication/public/app.js:14886–14896  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

14884 * @internal
14885 */
14886var setTextContent = function (node, text) {
14887 if (text) {
14888 var firstChild = node.firstChild;
14889
14890 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
14891 firstChild.nodeValue = text;
14892 return;
14893 }
14894 }
14895 node.textContent = text;
14896};
14897
14898/**
14899 * 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