Skip to content

Conversation

@ja-y-son
Copy link
Contributor

@ja-y-son ja-y-son commented Dec 2, 2025

Fixing #1429 to make sure element is getting the correct scoped custom element registry upon adoption.

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


Preview | Diff

dom.bs Outdated
<a for=Element>custom element registry</a> is null or is equal to <var>document</var>'s
<a>effective global custom element registry</a>, then set <var>inclusiveDescendant</var>'s
<a for=Element>custom element registry</a> to <var>inclusiveDescendant</var>'s
<a for=tree>parent</a>'s <a for=Element>custom element registry</a>.
Copy link
Member

Choose a reason for hiding this comment

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

Why is this not using the "effective global custom element registry" strategy discussed? It's not clear to me this is the same or why we need to be looking at document at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use "effective global custom element registry" strategy as discussed. Was trying to see if I could get the point across with another approach but it seems like "effective global custom element registry" is still the better way to go. Lmk if I'm missing anything on this idea.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

This looks good to me. We'll need tests next.

For the tests I'd like us to exercise some of the more complicated scenarios with some nodes having been assigned registries and others not, etc.

@ja-y-son
Copy link
Contributor Author

ja-y-son commented Dec 2, 2025

Just added some tests but I haven't fully verified them yet. Feel free to take a look.

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