MCPcopy
hub / github.com/webpack/webpack / detach

Function detach

lib/html/syntax.js:5540–5546  ·  view source on GitHub ↗
(/** @type {HtmlNode} */ node)

Source from the content-addressed store, hash-verified

5538 };
5539
5540 const detach = (/** @type {HtmlNode} */ node) => {
5541 const p = findParent(node);
5542 if (!p) return;
5543 const arr = childrenOf(p);
5544 const idx = arr.indexOf(node);
5545 if (idx !== -1) arr.splice(idx, 1);
5546 };
5547
5548 // ---------- insertion modes ----------
5549

Callers 2

adoptionAgencyFunction · 0.85
startTagInBodyFunction · 0.85

Calls 2

findParentFunction · 0.85
childrenOfFunction · 0.85

Tested by

no test coverage detected