If we allow DocumentFragments to be generated with nanohtml (https://github.com/choojs/nanohtml/pull/118), then we should make sure that they can't be used to morph the existing tree.
Morphing with a DocumentFragment doesn't make sense, because it doesn't have an actual root node.
Potentially we could also define that if a DocumentFragment is used it will only morph the children of the rootTree. That would also solve https://github.com/choojs/nanomorph/issues/96. But I think that should be discussed further somewhere.
For now this is my proposal: I added an assert statement, so it will reject DocumentFragments.
If we allow DocumentFragments to be generated with nanohtml (https://github.com/choojs/nanohtml/pull/118), then we should make sure that they can't be used to morph the existing tree.
Morphing with a DocumentFragment doesn't make sense, because it doesn't have an actual root node.
Potentially we could also define that if a DocumentFragment is used it will only morph the children of the rootTree. That would also solve https://github.com/choojs/nanomorph/issues/96. But I think that should be discussed further somewhere.
For now this is my proposal: I added an assert statement, so it will reject DocumentFragments.