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

Function _matchesUpcomingSibling

src/core/runtime/morph.js:167–176  ·  view source on GitHub ↗
(ctx, oldElt, startNode)

Source from the content-addressed store, hash-verified

165}
166
167function _matchesUpcomingSibling(ctx, oldElt, startNode) {
168 if (ctx.futureMatches.has(oldElt)) return true;
169 for (var sibling = startNode.nextSibling, i = 0; sibling && i < 10; sibling = sibling.nextSibling, i++) {
170 if (sibling instanceof Element && oldElt.isEqualNode(sibling)) {
171 ctx.futureMatches.add(oldElt);
172 return true;
173 }
174 }
175 return false;
176}
177
178function _removeNode(ctx, node) {
179 if (ctx.idMap.has(node)) {

Callers 2

_morphChildrenFunction · 0.70
_findBestMatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected