Skip to content

Commit

Permalink
Make moveBefore() return undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Dec 16, 2024
1 parent 4b54a0d commit 90d8339
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2714,23 +2714,6 @@ steps:
<p class=note>The <a>ensure pre-move validity</a> steps are a similar, but slightly stricter version
of the <a>ensure pre-insert validity</a> steps.</p>

<p>To <dfn>pre-move</dfn> 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><a>Ensure pre-move validity</a> of <var>node</var> into <var>parent</var> before
<var>child</var>.

<li><p>Let <var>referenceChild</var> be <var>child</var>.

<li><p>If <var>referenceChild</var> is <var>node</var>, then set <var>referenceChild</var> to
<var>node</var>'s <a for=tree>next sibling</a>.

<li><p><a for=/>Move</a> <var>node</var> into <var>parent</var> before <var>referenceChild</var>.

<li><p>Return <var>node</var>.
</ol>

<p><a lt="Other applicable specifications">Specifications</a> may define
<dfn export id=concept-node-insert-ext>insertion steps</dfn> for all or some <a for=/>nodes</a>. The
algorithm is passed <var>insertedNode</var>, as indicated in the <a for=/>insert</a> algorithm
Expand Down Expand Up @@ -3309,7 +3292,7 @@ interface mixin ParentNode {
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);

[CEReactions] Node moveBefore(Node node, Node? child);
[CEReactions] undefined moveBefore(Node node, Node? child);

Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
Expand Down Expand Up @@ -3425,10 +3408,14 @@ are:
method steps are:

<ol>
<li><p>Let <var>result</var> be the result of <a>pre-moving</a> <var>node</var> into <a>this</a>
before <var>child</var>.</p></li>
<li><p><a>Ensure pre-move validity</a> of <var>node</var> into <a>this</a>before <var>child</var>.

<li><p>Return <var>result</var>.</p></li>
<li><p>Let <var>referenceChild</var> be <var>child</var>.

<li><p>If <var>referenceChild</var> is <var>node</var>, then set <var>referenceChild</var> to
<var>node</var>'s <a for=tree>next sibling</a>.

<li><p><a for=/>Move</a> <var>node</var> into <a>this</a> before <var>referenceChild</var>.
</ol>

<p>The <dfn method for=ParentNode><code>querySelector(<var>selectors</var>)</code></dfn> method
Expand Down

0 comments on commit 90d8339

Please sign in to comment.