Skip to content

Commit

Permalink
Clarify null / not null checks for active speculative HTML parser
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Apr 20, 2021
1 parent 30c0169 commit f9119ac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -107474,7 +107474,7 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
particular <var>intended parent</var>, the UA must run the following steps:</p>

<ol>
<li><p>If there is an <span>active speculative HTML parser</span>, then return the result of
<li><p>If the <span>active speculative HTML parser</span> is not null, then return the result of
<span data-x="create a speculative mock element">creating a speculative mock element</span>
given <var>given namespace</var>, the tag name of the given token, and the attributes of the
given token.</p></li>
Expand Down Expand Up @@ -108208,7 +108208,7 @@ document.body.appendChild(text);
<p><span data-x="acknowledge self-closing flag">Acknowledge the token's <i data-x="self-closing flag">self-closing
flag</i></span>, if it is set.</p>

<p>If there is no <span>active speculative HTML parser</span>, then:</p>
<p>If the <span>active speculative HTML parser</span> is null, then:</p>

<ol>
<li><p id="meta-charset-during-parse">If the element has a <code
Expand Down Expand Up @@ -109708,7 +109708,7 @@ document.body.appendChild(text);

<dt id="scriptEndTag">An end tag whose tag name is "script"</dt>
<dd>
<p>If there is no <span>active speculative HTML parser</span> and the <span>JavaScript execution
<p>If the <span>active speculative HTML parser</span> is null and the <span>JavaScript execution
context stack</span> is empty, then <span>perform a microtask checkpoint</span>.</p>

<p>Let <var>script</var> be the <span>current node</span> (which will be a
Expand All @@ -109724,7 +109724,7 @@ document.body.appendChild(text);

<p>Increment the parser's <span>script nesting level</span> by one.</p>

<p>If there is no <span>active speculative HTML parser</span>, then <span data-x="prepare a
<p>If the <span>active speculative HTML parser</span> is null, then <span data-x="prepare a
script">prepare</span> the <var>script</var>. This might cause some script to execute, which
might cause <span data-x="dom-document-write">new characters to be inserted into the
tokenizer</span>, and might cause the tokenizer to output more tokens, resulting in a <a
Expand Down Expand Up @@ -111277,7 +111277,7 @@ document.body.appendChild(text);
<p>Increment the parser's <span>script nesting level</span> by one. Set the <span>parser pause
flag</span> to true.</p>

<p>If there is no <span>active speculative HTML parser</span> and the user agent supports SVG,
<p>If the <span>active speculative HTML parser</span> is null and the user agent supports SVG,
then <a href="https://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing">Process the
SVG <code data-x="">script</code> element</a> according to the SVG rules. <ref spec=SVG></p>

Expand Down Expand Up @@ -111337,7 +111337,7 @@ document.body.appendChild(text);
<ol>
<!-- this happens as part of one of the tasks that runs the parser -->

<li><p>If there is an <span>active speculative HTML parser</span>, then <span>stop the
<li><p>If the <span>active speculative HTML parser</span> is not null, then <span>stop the
speculative HTML parser</span> and return.</p></li>

<li><p>Set the <span>current document readiness</span> to "<code data-x="">interactive</code>"
Expand Down Expand Up @@ -111540,7 +111540,7 @@ document.body.appendChild(text);
parsing.)</p></li>

<li>
<p>If <var>parser</var> already has an <span>active speculative HTML parser</span>, then
<p>If <var>parser</var>'s <span>active speculative HTML parser</span> is not null, then
<span>stop the speculative HTML parser</span> for <var>parser</var>.</p>

<p class="note">This can happen when <code data-x="dom-document-write">document.write()</code>
Expand Down

0 comments on commit f9119ac

Please sign in to comment.