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

Function _removeNode

www/js/_hyperscript.esm.js:3668–3675  ·  view source on GitHub ↗
(ctx, node)

Source from the content-addressed store, hash-verified

3666 return false;
3667}
3668function _removeNode(ctx, node) {
3669 if (ctx.idMap.has(node)) {
3670 _moveBefore(ctx.pantry, node, null);
3671 } else {
3672 ctx.callbacks.beforeNodeRemoved?.(node);
3673 node.remove();
3674 }
3675}
3676function _moveBefore(parentNode, element, after) {
3677 if (parentNode.moveBefore) {
3678 try {

Callers 1

_morphChildrenFunction · 0.70

Calls 1

_moveBeforeFunction · 0.70

Tested by

no test coverage detected