Due to this check:
|
if (node.ownerDocument !== document) { |
while appending an element
like this and then updating a tracked variable it relies on.
Wondering why that check exists in the first place, and whether we can make it a bit more robust to allow this case.
In my project I have simply patched out this line and it seems to work just fine.