MCPcopy Index your code
hub / github.com/microsoft/SandDance / setTextContent

Function setTextContent

docs/external/js/react-dom.development.js:2686–2697  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

2684 */
2685
2686 var setTextContent = function (node, text) {
2687 if (text) {
2688 var firstChild = node.firstChild;
2689
2690 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
2691 firstChild.nodeValue = text;
2692 return;
2693 }
2694 }
2695
2696 node.textContent = text;
2697 };
2698
2699 // Do not use the below two methods directly!
2700 // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.

Callers 3

setInitialDOMPropertiesFunction · 0.85
updateDOMPropertiesFunction · 0.85
resetTextContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected