Repository navigation
Add parser tests for template and the frameset-ok flag - #62485
Merged
Merged
Conversation
6 tasks done
noamr
approved these changes
Sep 7, 2026
annevk
added a commit
to whatwg/html
that referenced
this pull request
Sep 7, 2026
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.
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.
See whatwg/html#3178.