Skip to content

Commit

Permalink
Closed shadow roots can be serializable too
Browse files Browse the repository at this point in the history
I missed this in review but my understanding of the discussion we had around #8867 was that the contract would be the same for open and closed shadow roots.

Tests: web-platform-tests/wpt#45624.
  • Loading branch information
annevk committed Apr 10, 2024
1 parent 11ea4a2 commit f2089ab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source
Expand Up @@ -112659,7 +112659,7 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
<p>Returns the result of serializing <var>element</var> to HTML. <span data-x="shadow root">Shadow roots</span> within <var>element</var> are serialized according to the provided options:</p>

<ul>
<li><p>If <code data-x="dom-GetHTMLOptions-serializableShadowRoots">serializableShadowRoots</code> is true, then all open shadow roots marked as <span data-x="shadow-serializable">serializable</span> are serialized.</p></li>
<li><p>If <code data-x="dom-GetHTMLOptions-serializableShadowRoots">serializableShadowRoots</code> is true, then all shadow roots marked as <span data-x="shadow-serializable">serializable</span> are serialized.</p></li>

<li><p>If the <code data-x="dom-GetHTMLOptions-shadowRoots">shadowRoots</code> array is provided, then all shadow roots specified in the array are serialized, regardless of whether or not they are marked as serializable.</p></li>
</ul>
Expand Down Expand Up @@ -131239,10 +131239,8 @@ document.body.appendChild(text);
<p>If one of the following is true:</p>

<ul>
<li><p><var>serializableShadowRoots</var> is true, <var>shadow</var>'s
<span data-x="shadow-serializable">serializable</span> is true, and <var>shadow</var>'s
<span data-x="concept-shadow-root-mode">mode</span> is "<code data-x="">open</code>";
or</p></li>
<li><p><var>serializableShadowRoots</var> is true and <var>shadow</var>'s
<span data-x="shadow-serializable">serializable</span> is true; or</p></li>

<li><p><var>shadowRoots</var> contains <var>shadow</var>,</p></li>
</ul>
Expand Down

0 comments on commit f2089ab

Please sign in to comment.