Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 50 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3324,8 +3324,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-descendant">descendant</dfn>,
<dfn data-x="concept-shadow-including-ancestor" data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-ancestor">shadow-including ancestor</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-descendant">shadow-including descendant</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-inclusive-descendant">shadow-including inclusive descendant</dfn>, and
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-inclusive-ancestor">shadow-including inclusive ancestor</dfn> concepts</li>
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-inclusive-descendant">shadow-including inclusive descendant</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-inclusive-ancestor">shadow-including inclusive ancestor</dfn>, and
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-host-including-inclusive-ancestor">host-including inclusive ancestor</dfn> concepts</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-first-child">first child</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-last-child">last child</dfn>,
<dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-next-sibling">next sibling</dfn>,
Expand Down Expand Up @@ -147342,8 +147343,53 @@ document.body.appendChild(text);
<li><p>Let <var>insertionLocation</var> be <var>commonAncestor</var>, after its last child, if
any.</p></li>

<li><p>Insert whatever <var>lastNode</var> ended up being in the previous step at the
<span>adjusted insertion location</span> given <var>insertionLocation</var>.</p></li>
<li><p>Let <var>adjustedInsertionLocation</var> be the <span>adjusted insertion location</span>
given <var>insertionLocation</var>.</p></li>

<li><p>Let <var>target</var> be the node in which <var>adjustedInsertionLocation</var> finds
itself.</p></li>

<li><p>Let <var>refNode</var> be the node <var>adjustedInsertionLocation</var> is immediately
before, or null if <var>adjustedInsertionLocation</var> is after <var>target</var>'s last
child.</p></li>

<li><p>If <var>lastNode</var>'s <span>parent</span> is non-null, then <span
data-x="concept-node-remove">remove</span> <var>lastNode</var>.</p></li>
<!-- XXX Removal does not currently run script: destroying an iframe element's navigable does
not unload its document, so no pagehide event is fired. Engines do fire pagehide when an
iframe is disconnected and we should update the spec to match. The conditions below are
therefore checked after the removal rather than before, so that they still hold once
removal can run script. -->

<li>
<p>If any of the following are true:</p>

<ul>
<li><var>lastNode</var>'s <span>parent</span> is non-null;</li>

<li><var>lastNode</var> is a <span>host-including inclusive ancestor</span> of
<var>target</var>;</li>

<li><var>target</var> is a <code>Document</code> node that already has an element child;
or</li>

<li><var>refNode</var> is non-null and its <span>parent</span> is
not <var>target</var>,</li>
</ul>

<p>then <var>lastNode</var> is dropped on the floor.</p>
</li>

<li>
<p>Otherwise:</p>

<ol>
<li><p><span>Assert</span>: <span>ensure pre-insert validity</span> given
<var>lastNode</var>, <var>target</var>, <var>refNode</var>, and « » does not throw.</p></li>

<li><p>Insert <var>lastNode</var> at <var>adjustedInsertionLocation</var>.</p></li>
</ol>
</li>

<li><p><span>Create an element for the token</span> for which <var>formattingElement</var> was created,
in the <span>HTML namespace</span>, with <var>furthestBlock</var> as the intended parent.</p></li>
Expand Down
Loading