Skip to content

Commit

Permalink
Move to ParentNode, simplify pre-move conditions, add web developer box
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Dec 12, 2024
1 parent 9b14470 commit 3f3e94c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2694,9 +2694,6 @@ of a <var>node</var> into a <var>parent</var> before a <var>child</var>:
<var>parent</var>'s <a>connected</a> status matches <var>node</var>'s <a>connected</a> status.</p>
</li>

<li><p>If <var>parent</var> is not a {{Document}}, {{DocumentFragment}}, or {{Element}}
<a for=/>node</a>, then <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.

<li><p>If <var>node</var> is a <a>host-including inclusive ancestor</a> of <var>parent</var>, then
<a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.

Expand Down Expand Up @@ -3313,6 +3310,7 @@ interface mixin ParentNode {
[CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
[CEReactions] Node moveBefore(Node node, Node? child);

Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
Expand Down Expand Up @@ -3361,6 +3359,16 @@ Element includes ParentNode;
the <a>node tree</a> are violated.
<!-- "NotFoundError" is impossible -->

<dt><code><var>node</var> . <a method for=ParentNode lt="moveBefore()">moveBefore</a>(<var>movedNode</var>, <var>child</var>)</code>
<dd>
<p>Moves, without first removing, <var>movedNode</var> into <var>node</var> after <var>child</var>
if <var>child</var> is non-null; otherwise after the <a>last child</a> of <var>node</var>. This
methods preserves state associated with <var>movedNode</var> so that it persists after the move.

<p><a>Throws</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}} if the constraints of
the <a>node tree</a> are violated.
<!-- "NotFoundError" is impossible -->

<dt><code><var>node</var> . <a method for=ParentNode lt="querySelector()">querySelector</a>(<var>selectors</var>)</code>
<dd><p>Returns the first <a for=/>element</a> that is a <a for=tree>descendant</a> of
<var>node</var> that matches <var>selectors</var>.
Expand Down Expand Up @@ -4254,7 +4262,6 @@ interface Node : EventTarget {
[CEReactions] Node appendChild(Node node);
[CEReactions] Node replaceChild(Node node, Node child);
[CEReactions] Node removeChild(Node child);
[CEReactions] Node moveBefore(Node node, Node? child);
};

dictionary GetRootNodeOptions {
Expand Down

0 comments on commit 3f3e94c

Please sign in to comment.