Skip to content

Commit

Permalink
Editorial: unconjugate "pre-insertion" and "pre-removing"
Browse files Browse the repository at this point in the history
Also stop exporting "ensure pre-insert validity" and modernize it a bit.

Co-authored-by: Anne van Kesteren <[email protected]>
  • Loading branch information
domfarolino and annevk authored Dec 12, 2024
1 parent bb30d16 commit 37fb987
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2611,9 +2611,9 @@ steps:

<h4 id=mutation-algorithms>Mutation algorithms</h4>

<p>To
<dfn export for=Node id=concept-node-ensure-pre-insertion-validity>ensure pre-insertion validity</dfn>
of a <var>node</var> into a <var>parent</var> before a <var>child</var>, run these steps:
<p>To <dfn id=concept-node-ensure-pre-insertion-validity>ensure pre-insert validity</dfn> of a
<a for=/>node</a> <var>node</var> into a <a for=/>node</a> <var>parent</var> before a
<a for=/>node</a> <var>child</var>:

<ol>
<li><p>If <var>parent</var> is not a {{Document}}, {{DocumentFragment}}, or {{Element}}
Expand Down Expand Up @@ -2667,7 +2667,7 @@ of a <var>node</var> into a <var>parent</var> before a <var>child</var>, run the
<var>parent</var> before a <var>child</var>, run these steps:

<ol>
<li><p><a>Ensure pre-insertion validity</a> of <var>node</var> into <var>parent</var> before
<li><p><a>Ensure pre-insert validity</a> of <var>node</var> into <var>parent</var> before
<var>child</var>.

<li><p>Let <var>referenceChild</var> be <var>child</var>.
Expand Down Expand Up @@ -3039,7 +3039,7 @@ optional <i>suppress observers flag</i>, run these steps:

<li><p>For each {{NodeIterator}} object <var>iterator</var> whose
<a for=traversal>root</a>'s <a for=Node>node document</a> is <var>node</var>'s
<a for=Node>node document</a>, run the <a><code>NodeIterator</code> pre-removing steps</a> given
<a for=Node>node document</a>, run the <a><code>NodeIterator</code> pre-remove steps</a> given
<var>node</var> and <var>iterator</var>.

<li><p>Let <var>oldPreviousSibling</var> be <var>node</var>'s <a>previous sibling</a>.
Expand Down Expand Up @@ -3275,8 +3275,7 @@ are:
<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a> given
<var>nodes</var> and <a>this</a>'s <a for=Node>node document</a>.

<li><p><a>Ensure pre-insertion validity</a> of <var>node</var> into <a>this</a> before
null.
<li><p><a>Ensure pre-insert validity</a> of <var>node</var> into <a>this</a> before null.

<li><p><a for=Node>Replace all</a> with <var>node</var> within <a>this</a>.
</ol>
Expand Down Expand Up @@ -9058,13 +9057,12 @@ result of <a for="live range">cloning the contents</a> of <a>this</a>.
<!-- IE9 and Chrome 12 dev throw an exception before splitting the text
node if the insertBefore() is going to throw an exception (at least if the
new node is the parent of the start node, for instance). Firefox 4.0 and
Opera 11.00 don't. Now that we have "ensure pre-insertion validity," we go
Opera 11.00 don't. Now that we have "ensure pre-insert validity," we go
with the IE/Chrome behavior because it's more correct.
IE9 doesn't call splitText() if the offset is 0. This makes sense, but I go
with what all other browsers do. -->
<li><a>Ensure pre-insertion validity</a>
of <var>node</var> into <var>parent</var> before
<li><a>Ensure pre-insert validity</a> of <var>node</var> into <var>parent</var> before
<var>referenceNode</var>.

<li>If <var>range</var>'s <a for=range>start node</a> is a {{Text}} <a for=/>node</a>, set
Expand Down Expand Up @@ -9403,8 +9401,8 @@ filter matches any <a for=/>node</a>.
<a for=traversal>active flag</a>, <a for=traversal>root</a>, <a for=traversal>whatToShow</a>, and
<a for=traversal>filter</a> as well.

<p>The <dfn><code>NodeIterator</code> pre-removing steps</dfn> given a <var>nodeIterator</var> and
<var>toBeRemovedNode</var>, are as follows:
<p>The <dfn id=nodeiterator-pre-removing-steps><code>NodeIterator</code> pre-remove steps</dfn>
given a <var>nodeIterator</var> and <var>toBeRemovedNode</var>, are as follows:

<ol>
<li><p>If <var>toBeRemovedNode</var> is not an <a for=tree>inclusive ancestor</a> of
Expand Down

0 comments on commit 37fb987

Please sign in to comment.