Skip to content

Reject config with <html> in replaceWithChildrenElements as invalid#377

Merged
evilpie merged 1 commit intoWICG:mainfrom
evilpie:html-invalid
Mar 10, 2026
Merged

Reject config with <html> in replaceWithChildrenElements as invalid#377
evilpie merged 1 commit intoWICG:mainfrom
evilpie:html-invalid

Conversation

@evilpie
Copy link
Copy Markdown
Collaborator

@evilpie evilpie commented Mar 4, 2026

Fixes #365.

We can't allow the replacement of the root <html> element with multiple elements. So we reject any config that has replaceWithChildrenElements: ["html"].


Preview | Diff

Copy link
Copy Markdown
Collaborator

@otherdaniel otherdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I think we need to also mention this at least once somewhere in the prose. E.g. in https://wicg.github.io/sanitizer-api/#invariants , maybe getting it's own bullet in the list following "Several conditions need to hold for a configuration to be valid:"

@evilpie evilpie merged commit 32bfe71 into WICG:main Mar 10, 2026
2 checks passed
github-actions bot added a commit that referenced this pull request Mar 10, 2026
…377)

SHA: 32bfe71
Reason: push, by evilpie

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't allow multiple root nodes to be created when using replaceWithChildren: ["html"]

2 participants