Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop reporting redundant fragment parser error in foreign content #9809

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -126934,18 +126934,18 @@ document.body.appendChild(text);
<li><p><i>Loop</i>: If <var>node</var> is the topmost element in the <span>stack of
open elements</span>, then return. (<span>fragment case</span>)</p></li>

<li><p>If <var>node</var> is an element in the <span>HTML namespace</span>, process the token
not-my-profile marked this conversation as resolved.
Show resolved Hide resolved
according to the rules given in the section corresponding to the current <span>insertion
mode</span> in HTML content.</p></li>

<li><p>If <var>node</var>'s tag name, <span>converted to ASCII lowercase</span>, is
the same as the tag name of the token, pop elements from the <span>stack of open
elements</span> until <var>node</var> has been popped from the stack, and then return.</p></li>

<li><p>Set <var>node</var> to the previous entry in the <span>stack of open
elements</span>.</p></li>

<li><p>If <var>node</var> is not an element in the <span>HTML namespace</span>, return
to the step labeled <i>loop</i>.</p></li>

<li><p>Otherwise, process the token according to the rules given in the section corresponding
to the current <span>insertion mode</span> in HTML content.</li>
<li><p>Return to the step labeled <i>loop</i>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Rewriting this set of steps as a https://infra.spec.whatwg.org/#iteration-while "While true" could be nice.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't really find "While true" any better than "loop" ... it's just as undescriptive regarding when the loop will terminate. In any case I think such a change should be done in a followup PR ... so that the diff of this clarification is minimal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While true with nested steps is much better than goto imo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes that's true ... there however aren't any nested steps here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, @annevk suggests switching from goto without nested steps to while true with nested steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right ... I think Anne meant that the real advantage of while is if you have multiple nested loops that is a loop within a loop, which as I pointed out isn't the case here.

In any case as I said I'd like to keep the changes in this commit minimal (since it fixes something that's wrong) and keep editorial changes to future PRs.

</ol>
</dd>
</dl>
Expand Down