Fix DOMException in switchElementsAlt() (fixes #103) #104
Reference in New Issue
Block a user
Delete Branch "robinnorth-patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Clone attribute nodes before setting on
oldElto prevent the following error:DOMException: Failed to execute 'setNamedItem' on 'NamedNodeMap': The node provided is an attribute node that is already an attribute of another Element; attribute nodes must be explicitly cloned.TIL. Unfortunately, MDN doesn't have a page on
NamedNodeMap.removeNamedItem(), and we don't have a test for that, so it wasn't caught until you found it.Thank you.
@BehindTheMath you're very welcome, TIL too! 😉