We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeaca34 commit 5f878ebCopy full SHA for 5f878eb
1 file changed
test/core.js
@@ -587,4 +587,16 @@ describe("Core morphing tests", function () {
587
`.trim(),
588
);
589
});
590
+
591
+ it("do not build id in new content parent into persistent id set", function () {
592
+ let initial = make("<span><div id='a'>Foo</div></span>");
593
+ let finalParent = make("<div id='a'><span>Bar</span></div>");
594
+ let finalSrc = finalParent.querySelector("span");
595
596
+ Idiomorph.morph(initial, finalSrc, { morphStyle: "outerHTML" });
597
598
+ // have to make sure the id located in the parent of the new content is not
599
+ // included in the persistent ID set or it will pantry the id'ed node in error
600
+ initial.outerHTML.should.equal("<span>Bar</span>");
601
+ });
602
0 commit comments