Clone attribute nodes before setting on oldEl to 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.
Clone attribute nodes before setting on `oldEl` to 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.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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! 😉