Skip to content

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
Collaborator

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
Member

@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
Collaborator

mfreed7 commented Jul 23, 2025

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

Post-merge, but this LGTM.

lando-prod-mozilla 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
i3roly pushed a commit to i3roly/firefox-dynasty 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.
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