MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _removeNode

Function _removeNode

src/core/runtime/morph.js:178–185  ·  view source on GitHub ↗
(ctx, node)

Source from the content-addressed store, hash-verified

176}
177
178function _removeNode(ctx, node) {
179 if (ctx.idMap.has(node)) {
180 _moveBefore(ctx.pantry, node, null);
181 } else {
182 ctx.callbacks.beforeNodeRemoved?.(node);
183 node.remove();
184 }
185}
186
187function _moveBefore(parentNode, element, after) {
188 if (parentNode.moveBefore) {

Callers 1

_morphChildrenFunction · 0.70

Calls 1

_moveBeforeFunction · 0.70

Tested by

no test coverage detected