Skip to content

Commit

Permalink
more fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Oct 2, 2023
1 parent 817f94b commit 27dda9a
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5005,8 +5005,8 @@ known as <dfn export id=concept-document lt="document">documents</dfn>.
<a for=/>encoding</a>, <a for=Document>content type</a> is
"<code>application/xml</code>", <a for=Document>URL</a> is "<code>about:blank</code>",
<a for=Document>origin</a> is an <a>opaque origin</a>,
<a for=Document>type</a> is "<code>xml</code>", <a for=Document>mode</a> is "<code>no-quirks</code>",
and <a for=Document>allow declarative shadow roots</a> is false.
<a for=Document>type</a> is "<code>xml</code>", <a for=Document>mode</a> is
"<code>no-quirks</code>", and its <a for=Document>allow declarative shadow roots</a> is false.

<p>A <a>document</a> is said to be an <dfn export>XML document</dfn> if its <a for=Document>type</a>
is "<code>xml</code>"; otherwise an <dfn export>HTML document</dfn>. Whether a <a>document</a> is an
Expand Down Expand Up @@ -6890,9 +6890,10 @@ are:
<p>The <dfn method for=Element><code>attachShadow(<var>init</var>)</code></dfn> method steps are:

<ol>
<li><p>Run <a>attach a shadow root</a> with <a>this</a>, <var>init</var>["{{ShadowRootInit/mode}}"],
<var>init</var>["{{ShadowRootInit/clonable}}"], <var>init</var>["{{ShadowRootInit/delegatesFocus}}"],
and <var>init</var>["{{ShadowRootInit/slotAssignment}}"].
<li><p>Run <a>attach a shadow root</a> with <a>this</a>,
<var>init</var>["{{ShadowRootInit/mode}}"], <var>init</var>["{{ShadowRootInit/clonable}}"],
<var>init</var>["{{ShadowRootInit/delegatesFocus}}"], and
<var>init</var>["{{ShadowRootInit/slotAssignment}}"].

<li><p>Return <a>this</a>'s <a for=Element>shadow root</a>.
</ol>
Expand All @@ -6907,8 +6908,8 @@ a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>:
<li><p>If <var>element</var>'s <a for=Element>namespace</a> is not the <a>HTML namespace</a>,
then <a>throw</a> a "{{NotSupportedError!!exception}}" {{DOMException}}.

<li><p>If <a>this</a>'s <a for=Element>local name</a> is not a <a>valid shadow host name</a>, then
<a>throw</a> a "{{NotSupportedError!!exception}}" {{DOMException}}.
<li><p>If <var>element</var>'s is not a <a>valid shadow host name</a>, then <a>throw</a> a
"{{NotSupportedError!!exception}}" {{DOMException}}.

<li>
<p>If <var>element</var>'s <a for=Element>local name</a> is a <a>valid custom element name</a>, or
Expand All @@ -6933,11 +6934,12 @@ a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>:
<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>Otherwise, <a for=/>remove</a> all of <var>element</var>'s
<a for=Element>shadow root</a>'s <a>children</a>, in <a>tree order</a>, and return.
<li>
<p>Otherwise, <a for=/>remove</a> all of <var>element</var>'s <a for=Element>shadow root</a>'s
<a>children</a>, in <a>tree order</a>, and return.

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

<li><p>Let <var>shadow</var> be a new <a for=/>shadow root</a> whose <a for=Node>node document</a>
Expand All @@ -6946,8 +6948,8 @@ a boolean <var>delegatesFocus</var>, and a boolean <var>slotAssignment</var>:

<li><p>Set <var>shadow</var>'s <a for=ShadowRoot>delegates focus</a> to <var>delegatesFocus</var>.

<li><p>If <a>this</a>'s <a for=Element>custom element state</a> is "<code>precustomized</code>" or
"<code>custom</code>", then set <var>shadow</var>'s
<li><p>If <var>element</var>'s <a for=Element>custom element state</a> is
"<code>precustomized</code>" or "<code>custom</code>", then set <var>shadow</var>'s
<a for=ShadowRoot>available to element internals</a> to true.

<li><p>Set <var>shadow</var>'s <a for=ShadowRoot>slot assignment</a> to <var>slotAssignment</var>.
Expand Down

0 comments on commit 27dda9a

Please sign in to comment.