Describe the bug
The ownerDocument property is not updated when appendChild() moves an element from one document to another.
To Reproduce
https://stackblitz.com/edit/js-xmldom-template-ma7jzuzj?file=index.js
Expected behavior
The ownerDocument must be updated to the new document (including the ownerDocument of all the children)
Runtime & Version:
xmldom version: 0.8.x 0.9.x
runtime version: node v20
other related software and version:
Additional context
This also applies to insertBefore, replaceChild, and the functions on DocumentFragment
Describe the bug
The
ownerDocumentproperty is not updated whenappendChild()moves an element from one document to another.To Reproduce
https://stackblitz.com/edit/js-xmldom-template-ma7jzuzj?file=index.js
Expected behavior
The
ownerDocumentmust be updated to the new document (including theownerDocumentof all the children)Runtime & Version:
xmldom version: 0.8.x 0.9.x
runtime version: node v20
other related software and version:
Additional context
This also applies to
insertBefore,replaceChild, and the functions onDocumentFragment