You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you shallow clone an element you would expect that modifying the attributes of the clone would have no effect on the original element but this is not the case. shallowClone() reuses the same Attributes object from the original element. We should be cloning the Attributes instead. Try the following test.
Element element = new Element("div");
Element clone = element.shallowClone();
clone.addClass("clazz");
assertEquals("", element.className());
The text was updated successfully, but these errors were encountered:
When you shallow clone an element you would expect that modifying the attributes of the clone would have no effect on the original element but this is not the case. shallowClone() reuses the same Attributes object from the original element. We should be cloning the Attributes instead. Try the following test.
Element element = new Element("div");
Element clone = element.shallowClone();
clone.addClass("clazz");
assertEquals("", element.className());
The text was updated successfully, but these errors were encountered: