Skip to content

Commit d94ce87

Browse files
authored
Reset declarative to false when calling attachShadow()
This was an oversight in the spec and this matches browser behavior. This makes a second call to `attachShadow()` throw. Closes #1234.
1 parent da484da commit d94ce87

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

dom.bs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6965,8 +6965,17 @@ a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>:
69656965
is false, then <a>throw</a> an "{{NotSupportedError!!exception}}" {{DOMException}}.
69666966

69676967
<li>
6968-
<p>Otherwise, <a for=/>remove</a> all of <var>element</var>'s <a for=Element>shadow root</a>'s
6969-
<a for=tree>children</a>, in <a>tree order</a>, and return.
6968+
<p>Otherwise:
6969+
6970+
<ol>
6971+
<li><p><a for=/>Remove</a> all of <var>element</var>'s <a for=Element>shadow root</a>'s
6972+
<a for=tree>children</a>, in <a>tree order</a>.
6973+
6974+
<li><p>Set <var>element</var>'s <a for=Element>shadow root</a>'s
6975+
<a for=ShadowRoot>declarative</a> to false.
6976+
6977+
<li><p>Return.
6978+
</ol>
69706979

69716980
<p class=note>This means that if multiple declarative shadow roots are contained within a single
69726981
shadow host, only the last one will remain.

0 commit comments

Comments
 (0)