You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves that it does not crash, but the behavior is different and I don't know how to solve it (please, some help). Now the HTML generated is this one:
After doing this:
I expect:
(Same behavior in Chrome, Safari and Firefox)
But I'm getting this error:
I see that is related with this code:
https://github.com/aralroca/happy-dom/blob/d7c7d45b9190663ca545aa6184a28eb812ab46ca/packages/happy-dom/src/nodes/document/Document.ts#L897-L904
Here is creating the
body
twice, and then in thehead
is using the body that is not appended. However, changing this:Resolves that it does not crash, but the behavior is different and I don't know how to solve it (please, some help). Now the HTML generated is this one:
I think this is because of the
doc.open()
not behaving properly. So we can reproduce the same HTML in browsers removing thedoc.open()
:But this is not what we want. This is necessary to process HTML in streaming in a separate document and to be able to parse the nodes as they come in.
Note
Same error happens with
document.write
Any idea how to solve it? Thanks
The text was updated successfully, but these errors were encountered: