Precise DOM morphing
morphing typescript dom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Another optimisation

+8
+8
src/morphlex.ts
··· 363 363 moveBefore(parent, match, insertionPoint) 364 364 this.morphOneToOne(match, node) 365 365 insertionPoint = match.nextSibling 366 + // Skip over any nodes that will be removed to avoid unnecessary moves 367 + while (insertionPoint && candidates.has(insertionPoint)) { 368 + insertionPoint = insertionPoint.nextSibling 369 + } 366 370 } else { 367 371 if (this.options.beforeNodeAdded?.(node) ?? true) { 368 372 moveBefore(parent, node, insertionPoint) 369 373 this.options.afterNodeAdded?.(node) 370 374 insertionPoint = node.nextSibling 375 + // Skip over any nodes that will be removed to avoid unnecessary moves 376 + while (insertionPoint && candidates.has(insertionPoint)) { 377 + insertionPoint = insertionPoint.nextSibling 378 + } 371 379 } 372 380 } 373 381 }