Skip to content

Commit d8556ca

Browse files
jgrahamAutomatedTester
authored andcommitted
Fix the definition of "get shadow root".
This previously had a few problems: * It only worked with open shadow roots. * It accessed JS properties which could be overridden by content, rather than using the node-interal data which cannot. * It returned a result of the form {value: shadow root reference} rather than {value: {shadow root identifer: shadow root reference}, making it inconsistent with the Element-returning methods.
1 parent 624221c commit d8556ca

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

index.html

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5061,29 +5061,18 @@ <h4><dfn>Get Element Shadow Root</dfn></h4>
50615061

50625062
<li><p>Let <var>element</var> be the result
50635063
of <a>trying</a> to <a>get a known connected element</a>
5064-
with <a>url variable</a> <var>element id</var>.
5064+
with <a>url variable</a> <var>element id</var>.
50655065

5066-
<li><p>Let <var>shadow root</var> be the result of getting an
5067-
<a>own property</a> named "shadowRoot" from <var>element</var>.
5066+
<li><p>Let <var>shadow root</var> be <var>element<var>'s <a>shadow root</a>.
50685067

5069-
<li><p>If <var>shadow root</var> is undefined, return <a>error</a>
5068+
<li><p>If <var>shadow root</var> is null, return <a>error</a>
50705069
with <a>error code</a> <a>no such shadow root</a>.
50715070

5072-
<li><p>Let <var>shadow root node type</var> be the result of
5073-
getting an <a>own property</a> named "nodeType" from
5074-
<var>shadow root</var>.
5071+
<li><p>Let <var>serialized</a> be the <a>shadow root reference object</a>
5072+
for <var>shadow root</var>.
50755073

5076-
<li><p>If <var>shadow root node type</var> is undefined, or has
5077-
a value other than <a>DOCUMENT_FRAGMENT_NODE</a>, return <a>error</a>
5078-
with <a>error code</a> <a>no such shadow root</a>.
5079-
5080-
<li><p>Let <var>shadow host</var> be the result of getting an
5081-
<a>own property</a> named "host" of <var>shadow root</var>.
5074+
<li><p>Return <a>success</a> with data <var>serialized</var>.
50825075

5083-
<li><p>If <var>shadow host</var> is not undefined or null, return
5084-
<a>a new shadow root reference</a>.
5085-
5086-
<p>Otherwise, return <a>error</a> with <a>error code</a> <a>no such shadow root</a>.
50875076
</ol>
50885077
</section> <!-- /Get Element Shadow Root -->
50895078
</section> <!-- /Retrieval -->

0 commit comments

Comments
 (0)