MCPcopy Create free account
hub / github.com/caseywebdev/react-list / clearContainerSparingly

Function clearContainerSparingly

docs/index.js:16900–16921  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

16898 retryIfBlockedOn(suspenseInstance);
16899}
16900function clearContainerSparingly(container) {
16901 var nextNode = container.firstChild;
16902 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
16903 for (; nextNode; ) {
16904 var node = nextNode;
16905 nextNode = nextNode.nextSibling;
16906 switch (node.nodeName) {
16907 case "HTML":
16908 case "HEAD":
16909 case "BODY":
16910 clearContainerSparingly(node);
16911 detachDeletedInstance(node);
16912 continue;
16913 case "SCRIPT":
16914 case "STYLE":
16915 continue;
16916 case "LINK":
16917 if ("stylesheet" === node.rel.toLowerCase()) continue;
16918 }
16919 container.removeChild(node);
16920 }
16921}
16922function canHydrateInstance(instance, type, props, inRootOrSingleton) {
16923 for (; 1 === instance.nodeType; ) {
16924 var anyProps = props;

Callers 1

Calls 1

detachDeletedInstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…