DOMException in switchElementsAlt when copying <head> attributes #103

Closed
opened 2018-01-17 14:11:34 -05:00 by robinnorth · 1 comment
robinnorth commented 2018-01-17 14:11:34 -05:00 (Migrated from github.com)

The new switchElementsAlt switch method throws a DOMException for 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 oldEl when switching resolves this issue.

The new `switchElementsAlt` switch method throws a `DOMException` for 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 `oldEl` when switching resolves this issue.
BehindTheMath commented 2018-01-17 17:32:09 -05:00 (Migrated from github.com)

Fixed by #104.

Fixed by #104.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#103