-
Notifications
You must be signed in to change notification settings - Fork 318
Scope non-scoped (global) registries to a single document #1392
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
Conversation
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.
This preserves existing behavior. We throw exceptions in certain corner cases to give us some wiggle room in the future to change some of this around. Corresponding HTML PR: TODO Tests: web-platform-tests/wpt#53791. Fixes #1390.
5bb8690 to
c431e0f
Compare
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.
LGTM
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.
Editorially this LGTM. For implementer support I defer to @mfreed7.
| <ol> | ||
| <li><p>Set <var>registry</var> to <var>init</var>["{{ShadowRootInit/customElementRegistry}}"]. | ||
|
|
||
| <li><p>If <var>registry</var>'s <a for=CustomElementRegistry>is scoped</a> is false and |
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.
Am I reading this correct that the only thing you can do with element.attachShadow({customElementRegistry: ...}) is to pass in the document's custom element registry, and anything else will throw an error? That makes it a boolean and practice, but I presume that this is a place where you're reserving some wiggle room for future changes?
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 can pass in document's custom element registry or a scoped custom element registry.
Align with the changes in whatwg/dom#1392 and whatwg/html#11472, add many more tests, and correct several tests.
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.
…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
…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
Align with the changes in whatwg/dom#1392 and whatwg/html#11472, add many more tests, and correct several tests.
This preserves existing behavior. We throw exceptions in certain corner cases to give us some wiggle room in the future to change some of this around.
Corresponding HTML PR: whatwg/html#11472.
Tests: web-platform-tests/wpt#53791.
Fixes #1390.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff