Skip to content

Commit

Permalink
Fix phrase-level wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed May 31, 2024
1 parent ffa0b2e commit 7e18bc4
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2647,9 +2647,9 @@ of a <var>node</var> into a <var>parent</var> before a <var>child</var>, run the
<dfn export id=concept-node-insert-ext>insertion steps</dfn> for all or some <a for=/>nodes</a>. The
algorithm is passed <var>insertedNode</var>, as indicated in the <a for=/>insert</a> algorithm
below. These steps must not modify the <a>node tree</a> that <var>insertedNode</var>
<a>participates</a> in, create <a for=/>browsing contexts</a>, <a lt="fire an event">fire
events</a>, or otherwise execute JavaScript. These steps may [=queue a global task|queue tasks=] to
do these things asynchronously, however.
<a>participates</a> in, create <a for=/>browsing contexts</a>,
<a lt="fire an event">fire events</a>, or otherwise execute JavaScript. These steps may
[=queue a global task|queue tasks=] to do these things asynchronously, however.

<div class=example id=example-foo-what-do-i-put-here>
<p>While the <a>insertion steps</a> cannot execute JavaScript (among other things), they will
Expand Down Expand Up @@ -2695,18 +2695,18 @@ do these things asynchronously, however.
adjust this further based on the requirements of the script element. There might be other ways
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-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><a lt="Other applicable specifications">Specifications</a> may also define
<dfn export 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-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>
<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.
<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> <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.

<p><a lt="other applicable specifications">Specifications</a> may define
<dfn export id=concept-node-children-changed-ext>children changed steps</dfn> for all or some
Expand Down Expand Up @@ -2813,11 +2813,12 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
<li>
<p>Let <var>staticNodeList</var> be a <a for=/>list</a> of <a for=/>nodes</a>, initially « ».</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>
<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 Down

0 comments on commit 7e18bc4

Please sign in to comment.