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

Function _isSoftMatch

www/js/_hyperscript-max.js:3703–3707  ·  view source on GitHub ↗
(oldNode, newNode)

Source from the content-addressed store, hash-verified

3701 }
3702 }
3703 function _isSoftMatch(oldNode, newNode) {
3704 if (!(oldNode instanceof Element) || oldNode.tagName !== newNode.tagName) return false;
3705 if (oldNode.tagName === "SCRIPT" && !oldNode.isEqualNode(newNode)) return false;
3706 return !oldNode.id || oldNode.id === newNode.id;
3707 }
3708 function _createIdMaps(oldNode, newContent) {
3709 var oldIdElements = _queryEltAndDescendants(oldNode, "[id]");
3710 var newIdElements = newContent.querySelectorAll("[id]");

Callers 1

_findBestMatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected