-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add Scoped Custom Element Registries #1341
base: main
Are you sure you want to change the base?
Conversation
Do not comment directly on this PR while it is in draft state. Use #10854 instead. DOM PR: whatwg/dom#1341. Tests: ...
66f3a02
to
dacf095
Compare
DOM PR: whatwg/dom#1341. Tests: ... Closes #10854.
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
dacf095
to
7e04bae
Compare
DOM PR: whatwg/dom#1341. Tests: ... Closes #10854.
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860 UltraBlame original commit: 4a4c1689ebd912108057f71fa24393009d4ab18a
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925 UltraBlame original commit: 78ef3074b0082c9e95d840a8010b34661973a847
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860 UltraBlame original commit: 4a4c1689ebd912108057f71fa24393009d4ab18a
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925 UltraBlame original commit: 78ef3074b0082c9e95d840a8010b34661973a847
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860 UltraBlame original commit: 4a4c1689ebd912108057f71fa24393009d4ab18a
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925 UltraBlame original commit: 78ef3074b0082c9e95d840a8010b34661973a847
…nly (and invert its value), a=testonly Automatic update from web-platform-tests DOM: rename importNode()'s deep to selfOnly (and invert its value) Part of whatwg/dom#1341. -- wpt-commits: 5bcf44cb07a74e284893af96926d932ec09705e7 wpt-pr: 50860
…ith scoped registries, a=testonly Automatic update from web-platform-tests DOM: createElement and createElementNS with scoped registries For whatwg/dom#1341. -- wpt-commits: a52f97983743aae5fdd5172c9938b47743dc7146 wpt-pr: 50925
DOM PR: whatwg/dom#1341. Tests: ... Closes #10854.
otherwise null. | ||
</dl> | ||
|
||
<p>The <dfn attribute for=DocumentOrShadowRoot><code>customElementRegistry</code></dfn> getter steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there setter steps for shadow roots with keep custom element registry null set to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you have to use the initialize()
API.
<p><a for=/>Shadow roots</a> have an associated | ||
<dfn for=ShadowRoot>keep custom element registry null</dfn> (a boolean). It is initially false. | ||
|
||
<p class=note>This can only ever be true in combination with declarative shadow roots. And it only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any cases where we want to be able to programmatically create shadow roots that emulate declarative shadow roots with a null registry?
I think this might be the first instance where we can't imperatively make a shadow root that matches a declarative shadow root. That should be an issue for polyfilling (true polyfills after some browsers have shipped) things for DSD.
For instance, to polyfill this feature, we would need to prevent declarative shadow roots from using the global registry. So we would have to emit on the server templates with an alternate shadowrootmode
attribute, and imperatively instantiate the shadow roots, and record the fact that it had shadowrootcustomelementregistry
attribute.
If a future feature required a similar technique, then either we'd need to be able to set this option when creating the shadow root or be able to set a shadow root's registry to null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already can't create all declarative shadow roots. Only declarative shadow roots have the declarative bit set, for instance.
Please do not comment directly on this PR unless asked. It's a big change and we want to keep it manageable. Use #1339 instead.
HTML PR: whatwg/html#10869.
Tests: web-platform-tests/wpt#50790.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff