Skip to content

Commit

Permalink
Wrapping and formatting nits
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Dec 20, 2024
1 parent 261d8f6 commit 622dd40
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -29485,8 +29485,8 @@ interface <dfn interface>HTMLImageElement</dfn> : <span>HTMLElement</span> {
<var>oldParent</var>, are:</p>

<ol>
<li><p>If <var>oldParent</var> is a <code>picture</code> element, then, count this as a
<span data-x="relevant mutations">relevant mutation</span> for <var>movedNode</var>.</p></li>
<li><p>If <var>oldParent</var> is a <code>picture</code> element, then, count this as a <span
data-x="relevant mutations">relevant mutation</span> for <var>movedNode</var>.</p></li>
</ol>

<p>The <code>img</code> <span>HTML element removing steps</span>, given <var>removedNode</var> and
Expand Down Expand Up @@ -36605,9 +36605,7 @@ interface <dfn interface>MediaError</dfn> {
<var>pointer</var> must be updated as follows:</p>

<dl>
<dt>If a new node is <span data-x="concept-node-insert-ext">inserted</span> or <span
data-x="concept-node-move-ext">moved</span> between the two nodes that define
<var>pointer</var></dt>
<dt>If a new node is <span data-x="concept-node-insert-ext">inserted</span> or <span data-x="concept-node-move-ext">moved</span> between the two nodes that define <var>pointer</var></dt>

<dd>Let <var>pointer</var> be the point between the node before <var>pointer</var> and the new node. In other words, insertions at <var>pointer</var> go after <var>pointer</var>.</dd>

Expand Down Expand Up @@ -72452,19 +72450,19 @@ document.body.append(parent);
elements as well. By default, the "<code data-x="">disconnectedCallback</code>" and "<code
data-x="">connectedCallback</code>" would be called on the element, one after the other. This is
done to maintain compatibility with existing custom elements that predate the <code
data-x="dom-ParentNode-moveBefore">moveBefore()</code> method. This means that by default, custom elements
reset their state as if they were removed and re-inserted. In the example <a
data-x="dom-ParentNode-moveBefore">moveBefore()</code> method. This means that by default, custom
elements reset their state as if they were removed and re-inserted. In the example <a
href="#custom-elements-autonomous-drawbacks-example">above</a>, the impact would be that the
observer would be disconnected and re-connected, and the tab index would be reset.</p>

<p>To opt in to a state-preserving behavior while <span
data-x="concept-node-move-ext">moving</span>, the author can implement a "<code
data-x="">connectedMoveCallback</code>". The existence of this callback, even if empty, would
supercede the default behavior of calling "<code data-x="">disconnectedCallback</code>" and "<code
data-x="">connectedCallback</code>". "<code data-x="">connectedMoveCallback</code>" can also be
an appropriate place to execute logic that depends on the element's ancestors. For example:</p>
data-x="">connectedCallback</code>". "<code data-x="">connectedMoveCallback</code>" can also be an
appropriate place to execute logic that depends on the element's ancestors. For example:</p>

<pre><code class="js">class TacoButton extends HTMLElement {
<pre><code class="js">class TacoButton extends HTMLElement {
static observedAttributes = ["disabled"];

constructor() {
Expand Down Expand Up @@ -72714,8 +72712,8 @@ document.body.append(parent);
<dt>A collection of <dfn
data-x="concept-custom-element-definition-lifecycle-callbacks">lifecycle callbacks</dfn></dt>
<dd>A map, whose keys are the strings "<code data-x="">connectedCallback</code>",
"<code data-x="">disconnectedCallback</code>", "<code data-x="">adoptedCallback</code>",
"<code data-x="">connectedMoveCallback</code>",
"<code data-x="">disconnectedCallback</code>", "<code data-x="">adoptedCallback</code>", "<code
data-x="">connectedMoveCallback</code>",
"<code data-x="">attributeChangedCallback</code>",
"<code data-x="">formAssociatedCallback</code>",
"<code data-x="">formDisabledCallback</code>",
Expand Down

0 comments on commit 622dd40

Please sign in to comment.