Skip to content

Remove "allow declarative shadow roots"#1478

Closed
noamr wants to merge 2 commits into
mainfrom
remove-adsd
Closed

Remove "allow declarative shadow roots"#1478
noamr wants to merge 2 commits into
mainfrom
remove-adsd

Conversation

@noamr

@noamr noamr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This is now a parser flag rather than a document associated boolean.

See whatwg/html#12624, also for checkboxes.


Preview | Diff

This is now a parser flag rather than a document associated boolean.

See whatwg/html#12624
Comment thread dom.bs Outdated
<a for=Document>URL</a>, <a for=Document>origin</a>, <a for=Document>type</a>,
<a for=Document>mode</a>, and <a for=Document>allow declarative shadow roots</a>, to those of
and <a for=Document>mode</a>, to those of
<var>node</var>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wrapping

I guess this also means there's a change in behavior here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think so because "allow declarative shadow roots" is only false for inert documents created for the purpose of fragment-parsing, and those are never cloned AFAICT.

In blink "allow declarative shadow roots" is a fragment parser config rather than something that stays on the document.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about XMLHttpRequest? It's not setting that flag today and I think that was intentional. Do we have tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

https://whatpr.org/html/12624/parsing.html#allow-declarative-shadow-roots is false by default, and https://xhr.spec.whatwg.org/#document-response uses the default settings, so I think spec-wise this is OK.

There is a test for this here.

@noamr

noamr commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

We still need this because of document.open(). Closing.

@noamr noamr closed this Jul 2, 2026
@annevk
annevk deleted the remove-adsd branch July 3, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants