Repository navigation
Reset frameset-ok when the body element is inserted implicitly - #12908
Merged
Merged
Conversation
The `<template>` start tag sets the frameset-ok flag to "not ok" in the "in head" insertion mode and nothing ever sets it back, so the standard says the `<frameset>` is ignored in `<head><template></template></head><p><frameset>`, whereas engines create a frameset document. The same goes for anything inside a head-level template that sets the flag, such as `<template>x</template><p><frameset>`. The "after head" insertion mode's "anything else" entry now sets the flag back to "ok" when it inserts the body element. Nothing seen up to that point can have been body content; before template there was no way to set the flag to "not ok" while still in the head, which is presumably why this was missed. A `<frameset>` inside a template stays ignored. The flag is read in exactly one place, the `<frameset>` start tag in the "in body" insertion mode, and it can now only be reset at the moment the body element is inserted. A template element can never be on the stack of open elements at that moment, so whenever a template is open and the second element on the stack of open elements is a body element the flag is still "not ok". Tests: web-platform-tests/wpt#62485 Fixes #3178.
noamr
approved these changes
Sep 7, 2026
sirreal
added a commit
to sirreal/wordpress-develop
that referenced
this pull request
Sep 16, 2026
whatwg/html#12908 (merged 2026-09-07) resets the frameset-ok flag to "ok" when the "after head" insertion mode inserts the BODY element implicitly. The HTML Processor does not do that yet, so `template/line0606` and `template/line0619` ignore the FRAMESET start tag where the fixture expects a frameset document.
lexborisov
added a commit
to TimWolla/lexbor
that referenced
this pull request
Sep 26, 2026
A template start tag in the "in head" insertion mode set the frameset-ok flag to "not ok", and nothing set it back. As a result, the frameset start tag was ignored in <head><template></template></head><p><frameset>, while the specification and browsers create a frameset document. whatwg/html#12908
txgk
added a commit
to gumbo-parser/gumbo-parser
that referenced
this pull request
Sep 27, 2026
fixes 6 new test cases from WPT scenarios added in the last commit whatwg/html#12908 whatwg/html#12911
takahashim
pushed a commit
to takahashim/makiri
that referenced
this pull request
Oct 18, 2026
The "after head" anything-else branch sets frameset-ok back to "ok", as whatwg/html#12908 added and Lexbor lacks. WPT template.dat #44-#46 now pass through the port; they stay listed for Lexbor's DOM. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BMxN4Q2YABFU7rja1q8bhg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reset frameset-ok when the body element is inserted implicitly
The
<template>start tag sets the frameset-ok flag to "not ok" in the"in head" insertion mode and nothing ever sets it back, so the standard
says the
<frameset>is ignored in<head><template></template></head><p><frameset>, whereas engines createa frameset document. The same goes for anything inside a head-level
template that sets the flag, such as
<template>x</template><p><frameset>.The "after head" insertion mode's "anything else" entry now sets the flag
back to "ok" when it inserts the body element. Nothing seen up to that
point can have been body content; before template there was no way to set
the flag to "not ok" while still in the head, which is presumably why this
was missed.
A
<frameset>inside a template stays ignored. The flag is read in exactlyone place, the
<frameset>start tag in the "in body" insertion mode, andit can now only be reset at the moment the body element is inserted. A
template element can never be on the stack of open elements at that moment,
so whenever a template is open and the second element on the stack of open
elements is a body element the flag is still "not ok".
Tests: web-platform-tests/wpt#62485
Fixes #3178.
(See WHATWG Working Mode: Changes for more details.)