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

Function _matchesUpcomingSibling

www/js/_hyperscript.esm.js:3658–3667  ·  view source on GitHub ↗
(ctx, oldElt, startNode)

Source from the content-addressed store, hash-verified

3656 return softMatch;
3657}
3658function _matchesUpcomingSibling(ctx, oldElt, startNode) {
3659 if (ctx.futureMatches.has(oldElt)) return true;
3660 for (var sibling = startNode.nextSibling, i = 0; sibling && i < 10; sibling = sibling.nextSibling, i++) {
3661 if (sibling instanceof Element && oldElt.isEqualNode(sibling)) {
3662 ctx.futureMatches.add(oldElt);
3663 return true;
3664 }
3665 }
3666 return false;
3667}
3668function _removeNode(ctx, node) {
3669 if (ctx.idMap.has(node)) {
3670 _moveBefore(ctx.pantry, node, null);

Callers 2

_morphChildrenFunction · 0.70
_findBestMatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected