Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one shadow root can be attached to an element #33650

Merged
merged 1 commit into from
May 17, 2024

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented May 17, 2024

Only one shadow root can be attached to an element. This documents what happens if you declare multiple <template shadowrootmode="open"> declarative shadow roots, or call attachShadow() to an existing shadow host.

This is based on the spec here https://dom.spec.whatwg.org/#concept-attach-a-shadow-root

Fixes #32289

Part of docs for #32731

@hamishwillee hamishwillee requested review from a team as code owners May 17, 2024 06:42
@hamishwillee hamishwillee requested review from sideshowbarker and dipikabh and removed request for a team May 17, 2024 06:42
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels May 17, 2024
Copy link
Contributor

@sideshowbarker sideshowbarker merged commit 4f7f3f7 into mdn:main May 17, 2024
7 checks passed
@hamishwillee hamishwillee deleted the shadow_root_multiple_times branch May 20, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There have been a few changes to declarative shadow DOM
2 participants