这是indexloc提供的服务,不要输入任何密码
Skip to content

Scope non-scoped (global) registries to a single document #11472

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

annevk
Copy link
Member

@annevk annevk commented 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: web-platform-tests/wpt#53791.

(See WHATWG Working Mode: Changes for more details.)


/custom-elements.html ( diff )

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.
@annevk annevk added normative change topic: custom elements Relates to custom elements (as defined in DOM and HTML) labels Jul 21, 2025
@mfreed7
Copy link
Contributor

mfreed7 commented Jul 22, 2025

@ja-y-son to review for Chromium

@ja-y-son
Copy link

Do we want to apply similar constraint while attaching shadow using ShadowRootInit?

@annevk
Copy link
Member Author

annevk commented Jul 22, 2025

Yes we do. See the corresponding DOM PR.

@ja-y-son
Copy link

The changes lgtm!

Copy link
Contributor

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

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

Editoral LGTM. For implementer support I defer to @mfreed7.

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 annevk merged commit 0cb27c8 into main Jul 23, 2025
2 checks passed
@annevk annevk deleted the annevk/scoped-non-scoped-cer branch July 23, 2025 06:30
annevk added a commit to whatwg/dom that referenced this pull request Jul 23, 2025
This preserves existing behavior. We throw exceptions in certain corner cases to give us some wiggle room in the future.

Corresponding HTML PR: whatwg/html#11472.

Tests: web-platform-tests/wpt#53791.

Fixes #1390.
@mfreed7
Copy link
Contributor

mfreed7 commented Jul 23, 2025

Editoral LGTM. For implementer support I defer to @mfreed7.

Post-merge, but this LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative change topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

Successfully merging this pull request may close these issues.

5 participants