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

Method morph

src/core/runtime/runtime.js:458–470  ·  view source on GitHub ↗
(elt, content)

Source from the content-addressed store, hash-verified

456 }
457
458 morph(elt, content) {
459 this.#morphEngine.morph(elt, content, {
460 beforeNodeRemoved: (node) => {
461 if (node.nodeType === 1) this.cleanup(node);
462 },
463 afterNodeAdded: (node) => {
464 if (node.nodeType === 1) this.processNode(node);
465 },
466 afterNodeMorphed: (node) => {
467 if (node.nodeType === 1) this.processNode(node);
468 }
469 });
470 }
471
472 replaceInDom(target, value) {
473 this.implicitLoop(target, (elt) => {

Callers

nothing calls this directly

Calls 2

cleanupMethod · 0.95
processNodeMethod · 0.95

Tested by

no test coverage detected