Skip to content

Commit

Permalink
Editorial: stop enumerating ShadowRoot alongside DocumentFragment
Browse files Browse the repository at this point in the history
We don’t mention other concrete subclasses either, such as
HTMLBodyElement. So the new policy is to list concrete classes
(DocumentFragment) unless they’re a subclass of a concrete class
(ShadowRoot) and not list abstract classes (CharacterData).

Fixes #190.
  • Loading branch information
annevk committed Aug 16, 2016
1 parent 026a772 commit 443023a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
16 changes: 4 additions & 12 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ can be used to explore this matter in more detail.

<h3 id=node-trees>Node tree</h3>

<p>{{Document}}, {{DocumentType}}, {{DocumentFragment}}, {{ShadowRoot}}, {{Element}}, {{Text}},
<p>{{Document}}, {{DocumentType}}, {{DocumentFragment}}, {{Element}}, {{Text}},
{{ProcessingInstruction}}, and {{Comment}} objects (simply called
<dfn export id=concept-node>nodes</dfn>) <a>participate</a> in a <a>tree</a>, simply named the
<dfn export id=concept-node-tree>node tree</dfn>.
Expand All @@ -1508,7 +1508,6 @@ can be used to explore this matter in more detail.
<li><p>Zero or more nodes each of which is {{ProcessingInstruction}} or {{Comment}}.
</ol>
<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dt>{{Element}}
<dd><p>Zero or more nodes each of which is {{Element}}, {{Text}}, {{ProcessingInstruction}}, or
{{Comment}}.
Expand Down Expand Up @@ -3460,8 +3459,8 @@ dictionary GetRootNodeOptions {
</pre>

<p class="note no-backref">{{Node}} is an abstract interface and does not exist as <a>node</a>. It
is used by all <a>nodes</a> ({{Document}}, {{DocumentType}}, {{DocumentFragment}}, {{ShadowRoot}},
{{Element}}, {{Text}}, {{ProcessingInstruction}}, and {{Comment}}).
is used by all <a>nodes</a> ({{Document}}, {{DocumentType}}, {{DocumentFragment}}, {{Element}},
{{Text}}, {{ProcessingInstruction}}, and {{Comment}}).

Each <a>node</a> has an associated
<dfn export for=Node id=concept-node-document>node document</dfn>, set upon creation,
Expand Down Expand Up @@ -3507,7 +3506,7 @@ that is a <a>document</a>.
<a>doctype</a>.

<dt><code>{{Node}} . {{Node/DOCUMENT_FRAGMENT_NODE}}</code> (11)
<dd><var>node</var> is a {{DocumentFragment}} or {{ShadowRoot}} <a>node</a>.
<dd><var>node</var> is a {{DocumentFragment}} <a>node</a>.
</dl>

<dt><code><var>node</var> . {{Node/nodeName}}</code>
Expand Down Expand Up @@ -3535,7 +3534,6 @@ that is a <a>document</a>.
<dd>Its <a for=DocumentType>name</a>.

<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dd>"<code>#document-fragment</code>".
</dl>
</dl>
Expand Down Expand Up @@ -3572,7 +3570,6 @@ the first matching statement, switching on the <a>context object</a>:
<dd><dfn const for=Node>DOCUMENT_TYPE_NODE</dfn> (10);

<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dd><dfn const for=Node>DOCUMENT_FRAGMENT_NODE</dfn> (11).
</dl>

Expand Down Expand Up @@ -3633,7 +3630,6 @@ the first matching statement, switching on the <a>context object</a>:
<dd>Its <a for=DocumentType>name</a>.

<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dd>"<code>#document-fragment</code>".
</dl>

Expand Down Expand Up @@ -3785,7 +3781,6 @@ following, switching on <a>context object</a>:

<dl class=switch>
<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dt>{{Element}}
<!--AttrExodus <dt>{{Attr}} -->
<dd>The concatenation of <a>data</a> of all
Expand All @@ -3809,7 +3804,6 @@ the empty string instead, and then do as described below, switching on <a>contex

<dl class=switch>
<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dt>{{Element}}
<!--AttrExodus <dt>{{Attr}} -->
<dd>
Expand Down Expand Up @@ -4320,7 +4314,6 @@ To <dfn export>locate a namespace</dfn> for a <var>node</var> using

<dt>{{DocumentType}}
<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dd>Return null.

<dt>Any other node
Expand Down Expand Up @@ -4358,7 +4351,6 @@ method must run these steps:

<dt>{{DocumentType}}
<dt>{{DocumentFragment}}
<dt>{{ShadowRoot}}
<dd>Return null.

<dt>Any other node
Expand Down
14 changes: 3 additions & 11 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ <h3 class="heading settled" data-level="4.1" id="introduction-to-the-dom"><span
concept is clear. Markup goes in, a <a data-link-type="dfn" href="#concept-tree">tree</a> of <a data-link-type="dfn" href="#concept-node">nodes</a> comes out.</p>
<p class="note no-backref" role="note">The most excellent <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/">Live DOM Viewer</a> can be used to explore this matter in more detail. </p>
<h3 class="heading settled" data-level="4.2" id="node-trees"><span class="secno">4.2. </span><span class="content">Node tree</span><a class="self-link" href="#node-trees"></a></h3>
<p><code class="idl"><a data-link-type="idl" href="#document">Document</a></code>, <code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>, <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>, <code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>, <code class="idl"><a data-link-type="idl" href="#element">Element</a></code>, <code class="idl"><a data-link-type="idl" href="#text">Text</a></code>, <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code>, and <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code> objects (simply called <dfn data-dfn-type="dfn" data-export="" id="concept-node">nodes<a class="self-link" href="#concept-node"></a></dfn>) <a data-link-type="dfn" href="#concept-tree-participate">participate</a> in a <a data-link-type="dfn" href="#concept-tree">tree</a>, simply named the <dfn data-dfn-type="dfn" data-export="" id="concept-node-tree">node tree<a class="self-link" href="#concept-node-tree"></a></dfn>. </p>
<p><code class="idl"><a data-link-type="idl" href="#document">Document</a></code>, <code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>, <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>, <code class="idl"><a data-link-type="idl" href="#element">Element</a></code>, <code class="idl"><a data-link-type="idl" href="#text">Text</a></code>, <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code>, and <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code> objects (simply called <dfn data-dfn-type="dfn" data-export="" id="concept-node">nodes<a class="self-link" href="#concept-node"></a></dfn>) <a data-link-type="dfn" href="#concept-tree-participate">participate</a> in a <a data-link-type="dfn" href="#concept-tree">tree</a>, simply named the <dfn data-dfn-type="dfn" data-export="" id="concept-node-tree">node tree<a class="self-link" href="#concept-node-tree"></a></dfn>. </p>
<p>A <a data-link-type="dfn" href="#concept-node-tree">node tree</a> is constrained as follows, expressed as a relationship between the type of <a data-link-type="dfn" href="#concept-node">node</a> and its allowed <a data-link-type="dfn" href="#concept-tree-child">children</a>: </p>
<dl>
<dt><code class="idl"><a data-link-type="idl" href="#document">Document</a></code>
Expand All @@ -1101,7 +1101,6 @@ <h3 class="heading settled" data-level="4.2" id="node-trees"><span class="secno"
<p>Zero or more nodes each of which is <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code> or <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code>. </p>
</ol>
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#element">Element</a></code>
<dd>
<p>Zero or more nodes each of which is <code class="idl"><a data-link-type="idl" href="#element">Element</a></code>, <code class="idl"><a data-link-type="idl" href="#text">Text</a></code>, <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code>, or <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code>. </p>
Expand Down Expand Up @@ -2126,7 +2125,7 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
};
</pre>
<p class="note no-backref" role="note"><code class="idl"><a data-link-type="idl" href="#node">Node</a></code> is an abstract interface and does not exist as <a data-link-type="dfn" href="#concept-node">node</a>. It
is used by all <a data-link-type="dfn" href="#concept-node">nodes</a> (<code class="idl"><a data-link-type="idl" href="#document">Document</a></code>, <code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>, <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>, <code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>, <code class="idl"><a data-link-type="idl" href="#element">Element</a></code>, <code class="idl"><a data-link-type="idl" href="#text">Text</a></code>, <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code>, and <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code>). </p>
is used by all <a data-link-type="dfn" href="#concept-node">nodes</a> (<code class="idl"><a data-link-type="idl" href="#document">Document</a></code>, <code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>, <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>, <code class="idl"><a data-link-type="idl" href="#element">Element</a></code>, <code class="idl"><a data-link-type="idl" href="#text">Text</a></code>, <code class="idl"><a data-link-type="idl" href="#processinginstruction">ProcessingInstruction</a></code>, and <code class="idl"><a data-link-type="idl" href="#comment">Comment</a></code>). </p>
<p>Each <a data-link-type="dfn" href="#concept-node">node</a> has an associated <dfn data-dfn-for="Node" data-dfn-type="dfn" data-export="" id="concept-node-document">node document<a class="self-link" href="#concept-node-document"></a></dfn>, set upon creation,
that is a <a data-link-type="dfn" href="#concept-document">document</a>.</p>
<p class="note no-backref" role="note">A <a data-link-type="dfn" href="#concept-node">node</a>’s <a data-link-type="dfn" href="#concept-node-document">node document</a> can be changed by the <a data-link-type="dfn" href="#concept-node-adopt">adopt</a> algorithm. </p>
Expand All @@ -2150,7 +2149,7 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<dt><code><code class="idl"><a data-link-type="idl" href="#node">Node</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-node-document_type_node">DOCUMENT_TYPE_NODE</a></code></code> (10)
<dd><var>node</var> is a <a data-link-type="dfn" href="#concept-doctype">doctype</a>.
<dt><code><code class="idl"><a data-link-type="idl" href="#node">Node</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-node-document_fragment_node">DOCUMENT_FRAGMENT_NODE</a></code></code> (11)
<dd><var>node</var> is a <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code> or <code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code> <a data-link-type="dfn" href="#concept-node">node</a>.
<dd><var>node</var> is a <code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code> <a data-link-type="dfn" href="#concept-node">node</a>.
</dl>
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-nodename">nodeName</a></code></code>
<dd>
Expand All @@ -2170,7 +2169,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<dt><code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>
<dd>Its <a data-link-type="dfn" href="#concept-doctype-name">name</a>.
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dd>"<code>#document-fragment</code>".
</dl>
</dl>
Expand All @@ -2190,7 +2188,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<dt><code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>
<dd><dfn class="idl-code" data-dfn-for="Node" data-dfn-type="const" data-export="" id="dom-node-document_type_node">DOCUMENT_TYPE_NODE<a class="self-link" href="#dom-node-document_type_node"></a></dfn> (10);
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dd><dfn class="idl-code" data-dfn-for="Node" data-dfn-type="const" data-export="" id="dom-node-document_fragment_node">DOCUMENT_FRAGMENT_NODE<a class="self-link" href="#dom-node-document_fragment_node"></a></dfn> (11).
</dl>
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-nodename">nodeName<a class="self-link" href="#dom-node-nodename"></a></dfn> attribute’s getter, when invoked, must return
Expand All @@ -2209,7 +2206,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<dt><code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>
<dd>Its <a data-link-type="dfn" href="#concept-doctype-name">name</a>.
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dd>"<code>#document-fragment</code>".
</dl>
<hr>
Expand Down Expand Up @@ -2289,7 +2285,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
following, switching on <a data-link-type="dfn" href="#context-object">context object</a>: </p>
<dl class="switch">
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#element">Element</a></code>
<dd>The concatenation of <a data-link-type="dfn" href="#concept-cd-data">data</a> of all
the <code class="idl"><a data-link-type="idl" href="#text">Text</a></code> <a data-link-type="dfn" href="#concept-node">node</a> <a data-link-type="dfn" href="#concept-tree-descendant">descendants</a> of the <a data-link-type="dfn" href="#context-object">context object</a>, in <a data-link-type="dfn" href="#concept-tree-order">tree order</a>.
Expand All @@ -2304,7 +2299,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
the empty string instead, and then do as described below, switching on <a data-link-type="dfn" href="#context-object">context object</a>: </p>
<dl class="switch">
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#element">Element</a></code>
<dd>
<ol>
Expand Down Expand Up @@ -2539,7 +2533,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
</ol>
<dt><code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dd>Return null.
<dt>Any other node
<dd>
Expand All @@ -2562,7 +2555,6 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
otherwise.
<dt><code class="idl"><a data-link-type="idl" href="#documenttype">DocumentType</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#documentfragment">DocumentFragment</a></code>
<dt><code class="idl"><a data-link-type="idl" href="#shadowroot">ShadowRoot</a></code>
<dd>Return null.
<dt>Any other node
<dd>Return the result of <a data-link-type="dfn" href="#locate-a-namespace-prefix">locating a namespace prefix</a> for its <a data-link-type="dfn" href="#parent-element">parent element</a>, or if that is null, null.
Expand Down

0 comments on commit 443023a

Please sign in to comment.