-
Notifications
You must be signed in to change notification settings - Fork 294
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
Enforce same parameters for attachShadow on declarative shadow root #1246
Changes from 6 commits
cbad36e
3b3e70a
13198db
1c63c4f
149f31c
1c0b37c
16dcb39
30a0f3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4502,6 +4502,8 @@ dom-Range-extractContents, dom-Range-cloneContents --> | |
<a for=ShadowRoot>clonable</a> is true: | ||
|
||
<ol> | ||
<li><p>Assert: <var>copy</var> is not a <a for=Element>shadow host</a>. | ||
|
||
<li><p>Run <a>attach a shadow root</a> with <var>copy</var>, <var>node</var>'s | ||
<a for=Element>shadow root</a>'s <a for=ShadowRoot>mode</a>, true, <var>node</var>'s | ||
<a for=Element>shadow root</a>'s <a for=ShadowRoot>delegates focus</a>, and <var>node</var>'s | ||
|
@@ -6929,7 +6931,7 @@ are: | |
<div algorithm> | ||
<p>To <dfn id=concept-attach-a-shadow-root>attach a shadow root</dfn>, given an | ||
<a for=/>element</a> <var>element</var>, a string <var>mode</var>, a boolean <var>clonable</var>, | ||
a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>: | ||
a boolean <var>delegatesFocus</var>, and a string <var>slotAssignment</var>: | ||
mfreed7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<ol> | ||
<li><p>If <var>element</var>'s <a for=Element>namespace</a> is not the <a>HTML namespace</a>, | ||
|
@@ -6958,8 +6960,20 @@ a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>: | |
<p>If <var>element</var> is a <a for=Element>shadow host</a>, then: | ||
|
||
<ol> | ||
<li><p>If <var>element</var>'s <a for=Element>shadow root</a>'s <a for=ShadowRoot>declarative</a> | ||
is false, then <a>throw</a> an "{{NotSupportedError!!exception}}" {{DOMException}}. | ||
<li><p>Let <var>currentShadowRoot</var> be <var>element</var>'s | ||
mfreed7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<a for=Element>shadow root</a>. | ||
|
||
<li> | ||
<p>If one of the following is true: | ||
|
||
<ul> | ||
<li><p><var>currentShadowRoot</var>'s <a for=ShadowRoot>declarative</a> is false, | ||
|
||
<li><p><var>currentShadowRoot</var>'s <a for=ShadowRoot>mode</a> does not match | ||
<var>mode</var>, or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there something missing here, or should the trailing or be removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should move up one bullet point I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. I removed the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pushed a fix for this (Domenic established a pattern to follow for new constructs) and also for the note we identified in the original issue as well as some wrapping nits. |
||
</ul> | ||
|
||
<p>then <a>throw</a> a "{{NotSupportedError!!exception}}" {{DOMException}}. | ||
|
||
<li> | ||
<p>Otherwise: | ||
|
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.
(It's weird that this has for=Element, but that's a pre-existing issue.)
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.
Want me to change something?
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.
If you want to take it on, it should be a separate PR making it a standalone term that doesn't belong to Element.