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

Function insertOrAppendPlacementNode

dash/deps/react-dom@18.3.1.js:23941–23966  ·  view source on GitHub ↗
(node, before, parent)

Source from the content-addressed store, hash-verified

23939 }
23940
23941 function insertOrAppendPlacementNode(node, before, parent) {
23942 var tag = node.tag;
23943 var isHost = tag === HostComponent || tag === HostText;
23944
23945 if (isHost) {
23946 var stateNode = node.stateNode;
23947
23948 if (before) {
23949 insertBefore(parent, stateNode, before);
23950 } else {
23951 appendChild(parent, stateNode);
23952 }
23953 } else if (tag === HostPortal) ; else {
23954 var child = node.child;
23955
23956 if (child !== null) {
23957 insertOrAppendPlacementNode(child, before, parent);
23958 var sibling = child.sibling;
23959
23960 while (sibling !== null) {
23961 insertOrAppendPlacementNode(sibling, before, parent);
23962 sibling = sibling.sibling;
23963 }
23964 }
23965 }
23966 } // These are tracked on the stack as we recursively traverse a
23967 // deleted subtree.
23968 // TODO: Update these during the whole mutation phase, not just during
23969 // a deletion.

Callers 1

commitPlacementFunction · 0.70

Calls 2

insertBeforeFunction · 0.70
appendChildFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…