-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Revamped Scoped Custom Element Registries (DOM side) #1339
Comments
|
Do not comment directly on this PR while it is in draft state. Use #1339 instead. HTML PR: ... Tests: ...
What happens when an element is inserted from another document? Today it is upgraded with the adopted document's registry. It seems like since these elements would generally have a specified |
In most scenarios those other documents don't have a browsing context so will end up with a null registry, but for |
The common case here is definitely legacy code that does Implementation concern: My understanding is that there's a strong desire to avoid initializing the For cross-document un-upgraded nodes with a customElements set, my concern is that generally these elements have their backing class changed to the adopting document's |
As I mentioned elsewhere rniwa and I looked at avoiding the null state, but it's not possible. I don't really understand your cross-document concern. If it's not upgraded, but has a registry, we can upgrade it through that registry. We don't use JS |
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
Just hoping to ensure we're covering it well. Mostly I wanted to make sure template cloning would be ok since this is a framework hot path, but we've also seen a surprising interest in moving custom elements between documents, e.g. with the PIP api. |
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
This is a sibling issue of whatwg/html#10854. Discussion of the proposal should probably go there, but for any niche concerns pertaining the DOM side this would be a good place to put them.
Some recent work I did such as 7801c9d is paving the way for this feature.
The text was updated successfully, but these errors were encountered: