Skip to content

Commit

Permalink
Throw an exception on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Sep 24, 2024
1 parent ad05126 commit fbbde69
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5037,13 +5037,22 @@ return the result of <a>pre-removing</a> <var>child</var> from <a>this</a>.
method steps are:

<ol>
<li><p>Let <var>perform state-preserving atomic move</var> be true if <a>this</a> is
<a>connected</a>, <var>node</var> is <a>connected</a>, <a>this</a>'s <a for=Node>node
document</a> is <a>fully active</a>, and <a>this</a>'s <a for=/>root</a> is the same as
<var>node</var>'s <a for=/>root</a>.</p></li>.
<li><p>If any of the following conditions are false:</p>

<li><p>If <var>perform state-preserving atomic move</var> is true, then set <a>this</a>'s <a
for=Node>node document</a>'s <a>state-preserving atomic move in progress</a> to true.</p></li>
<ul>
<li><p><a>this</a> is <a>connected</a>;</p></li>

<li><p><var>node</var> is <a>connected</a>;</p></li>

<li><p><a>this</a>'s <a for=Node>node document</a> is <a>fully active</a>; or</p></li>

<li><p><a>this</a>'s <a for=/>root</a> is the same as <var>node</var>'s <a for=/>root</a>,</p></li>
</ul>

<li><p>then <a>throw</a> "{{HierarchyRequestError!!exception}}" {{DOMException}}.</p>

<li><p>Set <a>this</a>'s <a for=Node>node document</a>'s
<a>state-preserving atomic move in progress</a> to true.</p></li>

<li><p>Let <var>return node</var> be the result of <a>pre-inserting</a> <var>node</var> into
<a>this</a> before <var>child</var>.</p></li>
Expand Down

0 comments on commit fbbde69

Please sign in to comment.