Skip to content

Editorial: Align fragment parsing algorithms with their parameter types#12361

Merged
annevk merged 2 commits intowhatwg:mainfrom
shannonbooth:parser-flags
Apr 13, 2026
Merged

Editorial: Align fragment parsing algorithms with their parameter types#12361
annevk merged 2 commits intowhatwg:mainfrom
shannonbooth:parser-flags

Conversation

@shannonbooth
Copy link
Copy Markdown
Member

@shannonbooth shannonbooth commented Apr 12, 2026

Invoke the HTML and XML fragment parsing algorithms separately, since they take different arguments. Also use 'parser scripting mode' for the HTML fragment parsing algorithms as the fragment parser sets the parsing mode to the 'Disabled' which is wider than the fragment parsing mode definition.

Fixes #12359


/dynamic-markup-insertion.html ( diff )
/parsing.html ( diff )

Invoke the HTML and XML fragment parsing algorithms separately, since
they take different arguments. Also use 'parser scripting mode' for the
HTML fragment parsing algorithms  as the fragment parser sets the
parsing mode to the 'Disabled' which is wider than the fragment
parsing mode definition.
@noamr
Copy link
Copy Markdown
Collaborator

noamr commented Apr 13, 2026

LGTM

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Looks good modulo nit.

source Outdated

<li><p>Let <var>newChildren</var> be the result of invoking <var>algorithm</var> given
<var>context</var>, <var>markup</var>, false, and <var>scriptingMode</var>.</p></li>
<li><p>Otherwise set <var>newChildren</var> to the result of invoking the <span>HTML fragment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<li><p>Otherwise set <var>newChildren</var> to the result of invoking the <span>HTML fragment
<li><p>Otherwise, set <var>newChildren</var> to the result of invoking the <span>HTML fragment

@annevk annevk merged commit 17308a5 into whatwg:main Apr 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

HTML Fragment Parser sets parsing mode to invalid flag

3 participants