Skip to content

Commit

Permalink
[Shadow DOM] (Bug 22141) Add Node.deepContains(Node? other)
Browse files Browse the repository at this point in the history
  • Loading branch information
hayatoito committed Aug 7, 2014
1 parent 3180b07 commit 14322e5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions spec/shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,21 @@ <h3>Shadow trees</h3>

<p>The <dfn>youngest shadow root</dfn> is the root node of the <a>youngest shadow tree</a>.</p>

<p>
A node <var>A</var> is called a <dfn>child or hosted shadow root</dfn> of a node <var>B</var>,
if either <var>A</var> is a child of <var>B</var> or A is the <a>root</a> node of the <a>shadow tree</a> that B <a>hosts</a>.
</p>

<p>
A node <var>A</var> is called a <dfn>deep descendant</dfn> of a node <var>B</var>,
if either <var>A</var> is a <a>child or hosted shadow root</a> of <var>B</var>
or <var>A</var> is <a>child or hosted shadow root</a> of a node <var>C</var> that is a <a>deep descendant</a> of <var>B</var>.
</p>

<p>
An <dfn>inclusive deep descendant</dfn> is a node or one of its <a title="deep descendant">deep descendants</a>.
</p>

<p class="note">
For convenience, the <a>shadow root</a> provides its own set of <a title="DOM tree accessors">DOM tree accessor</a> methods.
No <a title="node">nodes</a> other than the <a>shadow root</a> descendants are accessible with these methods.
Expand Down Expand Up @@ -1230,6 +1245,15 @@ <h3>Extensions to <code>Element</code> Interface</h3>
</dl>
</section>

<section>
<h3>Extensions to <code>Node</code> Interface</h3>

<dl class="idl" title="partial interface Node">
<dt>boolean deepContains(Node? other)</dt>
<dd>When invoked, the method <strong>must</strong> return true if <var>other</var> is an <a>inclusive deep descendant</a> of the <a>context object</a>, and false otherwise (including when <var>other</var> is null).</dd>
</dl>
</section>

<section>
<h3>The <code>content</code> element</h3>

Expand Down

0 comments on commit 14322e5

Please sign in to comment.