@@ -2563,8 +2563,7 @@ within a <var>parent</var>, run these steps:
2563
2563
<ol>
2564
2564
<li><p> Set <var> removedNodes</var> to « <var> child</var> ».
2565
2565
2566
- <li><p> <a for=/>Remove</a> <var> child</var> from its <var> parent</var> with the
2567
- <i> suppress observers flag</i> set.
2566
+ <li><p> <a for=/>Remove</a> <var> child</var> with the <i> suppress observers flag</i> set.
2568
2567
</ol>
2569
2568
2570
2569
<p class="note no-backref"> The above can only be false if <var> child</var> is <var> node</var> .
@@ -2621,7 +2620,7 @@ within a <var>parent</var>, run these steps:
2621
2620
<li><p> If <var> child</var> 's <a for=tree>parent</a> is not <var> parent</var> , then <a>throw</a> a
2622
2621
"{{NotFoundError!!exception}} " {{DOMException}} .
2623
2622
2624
- <li><p> <a for=/>Remove</a> <var> child</var> from <var> parent </var> .
2623
+ <li><p> <a for=/>Remove</a> <var> child</var> .
2625
2624
2626
2625
<li><p> Return <var> child</var> .
2627
2626
<!-- Technically this is post-remove. -->
@@ -2633,10 +2632,14 @@ within a <var>parent</var>, run these steps:
2633
2632
algorithm is passed <var ignore> removedNode</var> , and optionally <var ignore> oldParent</var> , as
2634
2633
indicated in the <a for=/>remove</a> algorithm below.
2635
2634
2636
- <p> To <dfn export id=concept-node-remove>remove</dfn> a <var> node</var> from a <var> parent </var> ,
2637
- with an optional <i> suppress observers flag</i> , run these steps:
2635
+ <p> To <dfn export id=concept-node-remove>remove</dfn> a <var> node</var> , with an optional
2636
+ <i> suppress observers flag</i> , run these steps:
2638
2637
2639
2638
<ol>
2639
+ <li><p> Let <var> parent</var> be <var> node</var> 's <a for=tree>parent</a>
2640
+
2641
+ <li><p> Assert: <var> parent</var> is non-null.
2642
+
2640
2643
<li><p> Let <var> index</var> be <var> node</var> 's <a for=tree>index</a> .
2641
2644
2642
2645
<li><p> For each <a>live range</a> whose <a for=range>start node</a> is an
@@ -3040,8 +3043,7 @@ steps:
3040
3043
<ol>
3041
3044
<li><p> If <a>context object</a> 's <a for=tree>parent</a> is null, then return.
3042
3045
3043
- <li><p> <a for=/>Remove</a> the <a>context object</a> from <a>context object</a> 's
3044
- <a for=tree>parent</a> .
3046
+ <li><p> <a for=/>Remove</a> the <a>context object</a> .
3045
3047
</ol>
3046
3048
3047
3049
@@ -5256,20 +5258,19 @@ when invoked, must run these steps:
5256
5258
the <i> clone children flag</i> set if <var> deep</var> is true.
5257
5259
</ol>
5258
5260
5259
- <a lt="Other applicable specifications">Specifications</a> may define
5260
- <dfn export id=concept-node-adopt-ext>adopting steps</dfn> for all or some
5261
- <a for=/>nodes</a> . The algorithm is passed <var> node</var> and
5262
- <var> oldDocument</var> , as indicated in the
5263
- <a>adopt</a> algorithm.
5261
+ <p> <a lt="Other applicable specifications">Specifications</a> may define
5262
+ <dfn export id=concept-node-adopt-ext>adopting steps</dfn> for all or some <a for=/>nodes</a> . The
5263
+ algorithm is passed <var> node</var> and <var> oldDocument</var> , as indicated in the <a>adopt</a>
5264
+ algorithm.
5264
5265
5265
- To <dfn export id=concept-node-adopt>adopt</dfn> a <var> node</var> into a <var> document</var> , run
5266
+ <p> To <dfn export id=concept-node-adopt>adopt</dfn> a <var> node</var> into a <var> document</var> , run
5266
5267
these steps:
5267
5268
5268
5269
<ol>
5269
5270
<li><p> Let <var> oldDocument</var> be <var> node</var> 's <a for=Node>node document</a> .
5270
5271
5271
- <li><p> If <var> node</var> 's <a for=tree>parent</a> is not null, <a for=/>remove</a> <var> node </var >
5272
- from its <a for=tree>parent</a > .
5272
+ <li><p> If <var> node</var> 's <a for=tree>parent</a> is non- null, then <a for=/>remove</a>
5273
+ <var> node </var > .
5273
5274
5274
5275
<li>
5275
5276
<p> If <var> document</var> is not <var> oldDocument</var> , then:
@@ -7510,7 +7511,7 @@ Necessarily, a <a>live range</a> might itself be modified as part of the mutatio
7510
7511
7511
7512
<p class="note no-backref"> See the <a for=/>insert</a> and <a for=/>remove</a> algorithms, the
7512
7513
{{Node/normalize()}} method, and the <a>replace data</a> and <a lt="split a Text node">split</a>
7513
- algorithms for the hairy details.
7514
+ algorithms for details.
7514
7515
7515
7516
<p> Updating <a>live ranges</a> in response to <a>node tree</a> mutations can be expensive. For every
7516
7517
<a>node tree</a> change, all affected {{Range}} objects need to be updated. Even if the application
@@ -8167,10 +8168,8 @@ run these steps:
8167
8168
<a>length</a> minus
8168
8169
<var> original start offset</var> , data the empty string.
8169
8170
8170
- <li> For each <var> node</var> in <var> nodes to remove</var> ,
8171
- in <a>tree order</a> ,
8172
- <a for=/>remove</a> <var> node</var> from
8173
- its <a for=tree>parent</a> .
8171
+ <li><p> For each <var> node</var> in <var> nodes to remove</var> , in <a>tree order</a> ,
8172
+ <a for=/>remove</a> <var> node</var> .
8174
8173
8175
8174
<li> If <var> original end node</var> is a {{Text}} ,
8176
8175
{{ProcessingInstruction}} , or {{Comment}}
@@ -8730,9 +8729,8 @@ the result of <a for="live range">cloning the contents</a> of the <a>context obj
8730
8729
<a for=tree>next sibling</a> .
8731
8730
<!-- Because we're about to remove node from its parent. -->
8732
8731
8733
- <li> If <var> node</var> 's <a for=tree>parent</a> is not
8734
- null, <a for=/>remove</a> <var> node</var> from its
8735
- <a for=tree>parent</a> .
8732
+ <li><p> If <var> node</var> 's <a for=tree>parent</a> is non-null, then <a for=/>remove</a>
8733
+ <var> node</var> .
8736
8734
8737
8735
<!-- Browsers disagree on how to handle the case where the range is
8738
8736
collapsed: do you increment the end offset so the node is now included, or
0 commit comments