DOMException in switchElementsAlt when copying <head> attributes #103
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
The new
switchElementsAltswitch method throws aDOMExceptionfor me when trying to copy<head>attributes: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.Cloning the attribute node before setting it on
oldElwhen switching resolves this issue.Fixed by #104.