Skip to content
Open
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 47 additions & 8 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ signaling that something has occurred, e.g., that an image has completed downloa
<p class=note>Other specifications use <a for=Event>relatedTarget</a> to define a
<code>relatedTarget</code> attribute. [[UIEVENTS]]

<p>An <a>event</a> has an associated <dfn export for=Event>source</dfn> (a
<a>potential event target</a>). Unless stated otherwise it is null.
Comment thread
dandclark marked this conversation as resolved.
Outdated

<p>An <a>event</a> has an associated <dfn export for=Event>touch target list</dfn> (a
<a for=/>list</a> of zero or more <a>potential event targets</a>). Unless stated otherwise it is the
empty list.
Expand Down Expand Up @@ -4936,7 +4939,8 @@ and an optional <a for=/>document</a> <dfn export for="clone a node"><var>docume
<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>serializable</a>, <var>node</var>'s
<a for=Element>shadow root</a>'s <a for=ShadowRoot>delegates focus</a>, <var>node</var>'s
<a for=Element>shadow root</a>'s <a for=ShadowRoot>slot assignment</a>, and
<a for=Element>shadow root</a>'s <a for=ShadowRoot>slot assignment</a>, <var>node</var>'s
<a for=Element>shadow root</a>'s <a for=ShadowRoot>reference target</a>, and
<var>shadowRootRegistry</var>.

<li><p>Set <var>copy</var>'s <a for=Element>shadow root</a>'s <a for=ShadowRoot>declarative</a>
Expand Down Expand Up @@ -6553,6 +6557,7 @@ interface ShadowRoot : DocumentFragment {
readonly attribute boolean clonable;
readonly attribute boolean serializable;
readonly attribute Element host;
attribute DOMString? referenceTarget;
Comment thread
dandclark marked this conversation as resolved.
Comment thread
dandclark marked this conversation as resolved.

attribute EventHandler onslotchange;
};
Expand Down Expand Up @@ -6590,6 +6595,9 @@ It is initially set to false.</p>
<p><a for=/>Shadow roots</a> have an associated <dfn for=ShadowRoot>serializable</dfn> (a boolean).
It is initially set to false.</p>

<p><a for=/>Shadow roots</a> have an associated <dfn export for=ShadowRoot>reference target</dfn>
(null or a string). It is initially set to null.

<p><a for=/>Shadow roots</a> have an associated <dfn for=ShadowRoot>custom element registry</dfn>
(null or a {{CustomElementRegistry}} object). It is initially null.</p>

Expand All @@ -6602,11 +6610,31 @@ is null.

<hr>

<p>A <a for=/>shadow root</a>'s <a>get the parent</a> algorithm, given an <var>event</var>, returns
null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow root</a> is the
<a for=tree>root</a> of <var>event</var>'s <a for=Event>path</a>'s first struct's
<a for=Event/path>invocation target</a>; otherwise <a for=/>shadow root</a>'s
<a for=DocumentFragment>host</a>.
<div algorithm="shadow root's get the parent">
<p>A <a for=/>shadow root</a> <var>shadowRoot</var>'s <a>get the parent</a> algorithm, given an
<var>event</var>, returns the result of the following steps:

<ol>
<li><p>If <var>event</var>'s <a>composed flag</a> is set, then return <var>shadowRoot</var>'s
<a for=DocumentFragment>host</a>.

<li><p>Let <var>target</var> be <var>event</var>'s <a for=Event>path</a>'s first struct's
<a for=Event/path>invocation target</a>.

<li><p>Let <var>source</var> be <var>event</var>'s <a for=Event>source</a>.

<li><p>If <var>shadowRoot</var> is not the <a for=tree>root</a> of <var>target</var>, and either
<var>source</var> is null or <var>shadowRoot</var> is not the <a for=tree>root</a> of
<var>source</var>, then return <var>shadowRoot</var>'s <a
for=DocumentFragment>host</a>.

<li><p>If <var>source</var> is not null, and <var>source</var>'s <a for=tree>root</a> is a
<a>shadow-including ancestor</a> of <var>shadowRoot</var>, then return the result of
<a>retargeting</a> <var>target</var> against <var>source</var>.
Comment thread
dandclark marked this conversation as resolved.
Outdated

<li><p>Return null.
</ol>
</div>

<hr>

Expand All @@ -6628,6 +6656,12 @@ null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow roo
<p>The <dfn attribute for=ShadowRoot><code>host</code></dfn> getter steps are to return
<a>this</a>'s <a for=DocumentFragment>host</a>.

<p>The <dfn attribute for=ShadowRoot><code>referenceTarget</code></dfn> getter steps are to return
<a>this</a>'s <a for=ShadowRoot>reference target</a>.

<p>The {{ShadowRoot/referenceTarget}} setter
steps are to set <a>this</a>'s <a for=ShadowRoot>reference target</a> to the given value.
Comment thread
dandclark marked this conversation as resolved.

<hr>

<p>The <dfn attribute for=ShadowRoot><code>onslotchange</code></dfn> attribute is an
Expand Down Expand Up @@ -6762,6 +6796,7 @@ dictionary ShadowRootInit {
SlotAssignmentMode slotAssignment = "named";
boolean clonable = false;
boolean serializable = false;
DOMString? referenceTarget = null;
CustomElementRegistry? customElementRegistry;
};
</pre>
Expand Down Expand Up @@ -7738,7 +7773,8 @@ are:
<var>init</var>["{{ShadowRootInit/mode}}"], <var>init</var>["{{ShadowRootInit/clonable}}"],
<var>init</var>["{{ShadowRootInit/serializable}}"],
<var>init</var>["{{ShadowRootInit/delegatesFocus}}"],
<var>init</var>["{{ShadowRootInit/slotAssignment}}"], and <var>registry</var>.
<var>init</var>["{{ShadowRootInit/slotAssignment}}"],
<var>init</var>["{{ShadowRootInit/referenceTarget}}"], and <var>registry</var>.
Comment thread
dandclark marked this conversation as resolved.

<li><p>Return <a>this</a>'s <a for=Element>shadow root</a>.
</ol>
Expand All @@ -7748,7 +7784,8 @@ are:
<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>serializable</var>, a boolean <var>delegatesFocus</var>, a string
<var>slotAssignment</var>, and null or a {{CustomElementRegistry}} object <var>registry</var>:
<var>slotAssignment</var>, null or a string <var>referenceTarget</var>, and null or a
{{CustomElementRegistry}} object <var>registry</var>:

<ol>
<li><p>If <var>element</var>'s <a for=Element>namespace</a> is not the <a>HTML namespace</a>,
Expand Down Expand Up @@ -7822,6 +7859,8 @@ a boolean <var>serializable</var>, a boolean <var>delegatesFocus</var>, a string

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

<li><p>Set <var>shadow</var>'s <a for=ShadowRoot>reference target</a> to <var>referenceTarget</var>.

<li><p>Set <var>shadow</var>'s <a for=ShadowRoot>custom element registry</a> to
<var>registry</var>.

Expand Down