bigskysoftware / idiomorph

A DOM-merging algorithm
BSD 2-Clause "Simplified" License
631 stars 31 forks source link

Improve morph support for `<template>` elements #49

Open seanpdoyle opened 2 months ago

seanpdoyle commented 2 months ago

Closes #15

When morphing <template> elements, treat the DocumentFragment instances returned from the HTMLTemplateElement.content properties as morphChildren methods' newParent and oldParent variables.

That way, descendant nodes can be iterated across the connected-disconnected boundary.