Skip to content

Conversation

@karlseguin
Copy link
Collaborator

I couldn't find where the behavior is described. AND, browsers seem to behave differently depending on the state of the page (blank document vs actual page).

Still, some sites use innerHTML to load <script> tags, and, in libdom at least, these are created in the implicit head. We cannot just copy the body nodes. To keep it simple, I now copy all head and body elements.

I couldn't find where the behavior is described. AND, browsers seem to behave
differently depending on the state of the page (blank document vs actual page).

Still, some sites use innerHTML to load <script> tags, and, in libdom at least,
these are created in the implicit head. We cannot just copy the body nodes. To
keep it simple, I now copy all head and body elements.
@karlseguin karlseguin merged commit d6ace3f into main Jul 11, 2025
10 checks passed
@karlseguin karlseguin deleted the innerHTML_head branch July 11, 2025 00:03
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants