Skip to content

Commit

Permalink
Add child text content and its change steps
Browse files Browse the repository at this point in the history
Part of fixing whatwg/html#2752. The "child text content" concept was previously defined in HTML, but is being moved here.
  • Loading branch information
domenic committed Jun 15, 2017
1 parent 4512167 commit 3d71dad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dom.bs
Expand Up @@ -2001,6 +2001,9 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
<var>child</var>, and previousSibling <var>child</var>'s
<a>previous sibling</a> or <var>parent</var>'s <a>last child</a> if
<var>child</var> is null.

<li>If <var>node</var> is a {{Text}} node, run the <a>child text content change steps</a> for
<var>parent</var>.
</ol>


Expand Down Expand Up @@ -2281,6 +2284,9 @@ with an optional <i>suppress observers flag</i>, run these steps:
<var>parent</var> with removedNodes a list solely containing <var>node</var>,
nextSibling <var>oldNextSibling</var>, and previousSibling
<var>oldPreviousSibling</var>.

<li>If <var>node</var> is a {{Text}} node, run the <a>child text content change steps</a> for
<var>parent</var>.
</ol>


Expand Down Expand Up @@ -6761,6 +6767,9 @@ To <dfn export id=concept-cd-replace>replace data</dfn> of node <var>node</var>
<a>end offset</a> by the number of
<a>code units</a> in
<var>data</var>, then decrease it by <var>count</var>.

<li>If <var>node</var> is a {{Text}} node and its <a>parent</a> is not null, run the
<a>child text content change steps</a> for <var>node</var>'s <a>parent</a>.
</ol>
<!-- delete happens after insert for better cursor positioning with editing
https://www.w3.org/Bugs/Public/show_bug.cgi?id=13153 -->
Expand Down Expand Up @@ -6891,6 +6900,13 @@ if any, and its <a>contiguous exclusive <code>Text</code> nodes</a>, and <var>no
<a for=tree>next sibling</a> <a>exclusive <code>Text</code> node</a>, if any, and its
<a>contiguous exclusive <code>Text</code> nodes</a>, avoiding any duplicates.

<p>The <dfn export id=concept-child-text-content>child text content</dfn> of a <a>node</a>
<var>node</var> is the concatenation of the <a for=CharacterData>data</a> of all the {{Text}} node
<a>children</a> of <var>node</var>, in <a>tree order</a>.

<p>This and <a lt="other applicable specifications">other specifications</a> may define
<dfn export id=concept-node-text-change-ext>child text content change steps</dfn> for <a>nodes</a>.

<hr>

<p>The <dfn constructor for=Text><code>Text(<var>data</var>)</code></dfn> constructor, when invoked,
Expand Down

0 comments on commit 3d71dad

Please sign in to comment.