Scope non-scoped (global) registries to a single document#1392
Merged
Conversation
annevk
added a commit
to whatwg/html
that referenced
this pull request
Jul 21, 2025
Let the global custom element registry not escape its document for now. We throw an exception to give us some wiggle room in the future. DOM issue and PR: whatwg/dom#1390 & whatwg/dom#1392. Tests: TODO.
6 tasks
This preserves existing behavior. We throw exceptions in certain corner cases to give us some wiggle room in the future to change some of this around. Corresponding HTML PR: TODO Tests: web-platform-tests/wpt#53791. Fixes #1390.
5bb8690 to
c431e0f
Compare
foolip
approved these changes
Jul 22, 2025
| <ol> | ||
| <li><p>Set <var>registry</var> to <var>init</var>["{{ShadowRootInit/customElementRegistry}}"]. | ||
|
|
||
| <li><p>If <var>registry</var>'s <a for=CustomElementRegistry>is scoped</a> is false and |
Member
There was a problem hiding this comment.
Am I reading this correct that the only thing you can do with element.attachShadow({customElementRegistry: ...}) is to pass in the document's custom element registry, and anything else will throw an error? That makes it a boolean and practice, but I presume that this is a place where you're reserving some wiggle room for future changes?
There was a problem hiding this comment.
you can pass in document's custom element registry or a scoped custom element registry.
annevk
added a commit
to web-platform-tests/wpt
that referenced
this pull request
Jul 23, 2025
Align with the changes in whatwg/dom#1392 and whatwg/html#11472, add many more tests, and correct several tests.
annevk
added a commit
to whatwg/html
that referenced
this pull request
Jul 23, 2025
Let the global custom element registry not escape its document for now. We throw an exception to give us some wiggle room in the future. DOM issue and PR: whatwg/dom#1390 & whatwg/dom#1392. Tests: web-platform-tests/wpt#53791.
lando-worker bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Jul 28, 2025
…s, a=testonly Automatic update from web-platform-tests DOM: Scoped Custom Element Registry update Align with the changes in whatwg/dom#1392 and whatwg/html#11472, add many more tests, and correct several tests. -- wpt-commits: 3039174912db3ed199ff9a8dddc9add246658ae1 wpt-pr: 53791
foolip
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Aug 13, 2025
Align with the changes in whatwg/dom#1392 and whatwg/html#11472, add many more tests, and correct several tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This preserves existing behavior. We throw exceptions in certain corner cases to give us some wiggle room in the future to change some of this around.
Corresponding HTML PR: whatwg/html#11472.
Tests: web-platform-tests/wpt#53791.
Fixes #1390.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff