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

Method morph

www/js/_hyperscript-max.js:2472–2484  ·  view source on GitHub ↗
(elt, content)

Source from the content-addressed store, hash-verified

2470 this.reactivity.notifyProperty(obj);
2471 }
2472 morph(elt, content) {
2473 this.#morphEngine.morph(elt, content, {
2474 beforeNodeRemoved: (node) => {
2475 if (node.nodeType === 1) this.cleanup(node);
2476 },
2477 afterNodeAdded: (node) => {
2478 if (node.nodeType === 1) this.processNode(node);
2479 },
2480 afterNodeMorphed: (node) => {
2481 if (node.nodeType === 1) this.processNode(node);
2482 }
2483 });
2484 }
2485 replaceInDom(target, value) {
2486 this.implicitLoop(target, (elt) => {
2487 var parent = elt.parentElement;

Callers

nothing calls this directly

Calls 3

cleanupMethod · 0.95
processNodeMethod · 0.95
morphMethod · 0.45

Tested by

no test coverage detected