Skip to content

Commit

Permalink
Post-connection steps. Also <i> -> <em>
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed May 13, 2024
1 parent b31d333 commit 7a06b38
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2684,8 +2684,8 @@ do these things asynchronously, however.
spec=HTML>style</a></code> element; they immediately apply its style rules to the document.
[[!HTML]]

<li>The HTML Standard's <a>post-insertion steps</a> run for the <{script}> element; they run
the script, which immediately observes the style rules that were applied in the above step.
<li>The HTML Standard's <a>post-connection steps</a> run for the <{script}> element; they run the
script, which immediately observes the style rules that were applied in the above step.
[[!HTML]]
</ol>
</li>
Expand All @@ -2697,15 +2697,15 @@ do these things asynchronously, however.
to define that though as Olli suggests, so leaving that out for now. -->

<p><a lt="Other applicable specifications">Specifications</a> may also define <dfn export
id=concept-node-post-insert-ext>post-insertion steps</dfn> for all or some <a for=/>nodes</a>. The
algorithm is passed <var ignore>insertedNode</var>, as indicated in the <a
for=/>insert</a> algorithm below.
id=concept-node-post-connection-ext>post-connection steps</dfn> for all or some <a for=/>nodes</a>.
The algorithm is passed <var ignore>connectedNode</var>, as indicated in the <a for=/>insert</a>
algorithm below.

<p class=note>The purpose of the <a>post-insertion steps</a> is to provide an opportunity for <a
for=/>nodes</a> to perform any insertion-related operations that modify the <a>node tree</a> that
<var ignore>insertedNode</var> <a>participates</a> in, create <a for=/>browsing contexts</a>, or
<p class=note>The purpose of the <a>post-connection steps</a> is to provide an opportunity for <a
for=/>nodes</a> to perform any connection-related operations that modify the <a>node tree</a> that
<var ignore>connectedNode</var> <a>participates</a> in, create <a for=/>browsing contexts</a>, or
otherwise execute JavaScript. These steps allow a batch of <a>nodes</a> to be <a for=/>inserted</a>
<i>atomically</i> with respect to script, with all major side effects occurring <i>after</i> the
<em>atomically</em> with respect to script, with all major side effects occurring <em>after</em> the
batch insertions into the <a>node tree</a> is complete. This ensures that all pending <a>node
tree</a> insertions completely finish before more insertions can occur.

Expand Down Expand Up @@ -2815,11 +2815,11 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
<p>Let <var>staticNodeList</var> be a <a for=/>list</a> of <a for=/>nodes</a>, initially
empty.</p>

<p class="note">We collect all <a for=/>nodes</a> <i>before</i> calling the <a>post-insertion
steps</a> on any one of them, instead of calling the <a>post-insertion steps</a> <i>while</i>
we're traversing the <a>node tree</a>. This is because the <a>post-insertion steps</a> can
modify the tree's structure, making live traversal unsafe, possibly leading to the
<a>post-insertion steps</a> being called multiple times on the same <a>node</a>.</p>
<p class="note">We collect all <a for=/>nodes</a> <em>before</em> calling the <a>post-connection
steps</a> on any one of them, instead of calling the <a>post-connection steps</a> <em>while</em>
we're traversing the <a>node tree</a>. This is because the <a>post-connection steps</a> can modify
the tree's structure, making live traversal unsafe, possibly leading to the <a>post-connection
steps</a> being called multiple times on the same <a>node</a>.</p>
</li>

<li>
Expand All @@ -2833,7 +2833,7 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
</li>

<li><p><a for=list>For each</a> <var>node</var> in <var>staticNodeList</var>, if <var>node</var> is
<a>connected</a>, then run the <a>post-insertion steps</a> with <var>node</var>.
<a>connected</a>, then run the <a>post-connection steps</a> with <var>node</var>.
</ol>


Expand Down

0 comments on commit 7a06b38

Please sign in to comment.