Skip to content

Commit

Permalink
Only queue connectedMoveCallback if connected
Browse files Browse the repository at this point in the history
Initially, we could unconditionally queue the connectedMoveCallback,
because `moveBefore()` only worked when the origin and destination were
both connected. After
2bbc834,
we support the disconnected->disconnected case, which means we have to
explicitly gate this step on being connected.
  • Loading branch information
domfarolino committed Nov 27, 2024
1 parent 230423d commit 36d78b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2982,9 +2982,10 @@ before a <var>child</var>, run these steps:
<a>insertion steps</a> or <a>removing steps</a> for <var>inclusiveDescendant</var>.
</li>

<p>If <var>inclusiveDescendant</var> is <a for=Element>custom</a>, then
<a>enqueue a custom element callback reaction</a> with <var>inclusiveDescendant</var>, callback
name "<code>connectedMoveCallback</code>", and an empty argument list.
<p>If <var>inclusiveDescendant</var> is <a for=Element>custom</a> and <var>newParent</var> is
<a>connected</a>, then <a>enqueue a custom element callback reaction</a> with
<var>inclusiveDescendant</var>, callback name "<code>connectedMoveCallback</code>", and an empty
argument list.

<li>
<p>Otherwise, <a lt="try to upgrade an element">try to upgrade</a>
Expand Down

0 comments on commit 36d78b1

Please sign in to comment.