MCPcopy Create free account
hub / github.com/plotly/dash / setTextContent

Function setTextContent

dash/deps/react-dom@18.3.1.js:2459–2470  ·  view source on GitHub ↗
(node, text)

Source from the content-addressed store, hash-verified

2457 */
2458
2459 var setTextContent = function (node, text) {
2460 if (text) {
2461 var firstChild = node.firstChild;
2462
2463 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
2464 firstChild.nodeValue = text;
2465 return;
2466 }
2467 }
2468
2469 node.textContent = text;
2470 };
2471
2472 // List derived from Gecko source code:
2473 // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js

Callers 3

setInitialDOMPropertiesFunction · 0.70
updateDOMPropertiesFunction · 0.70
resetTextContentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…