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

Function _isSoftMatch

www/js/_hyperscript.esm.js:3702–3706  ·  view source on GitHub ↗
(oldNode, newNode)

Source from the content-addressed store, hash-verified

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

Callers 1

_findBestMatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected