Skip to content

Fix insertion location of <template> for declarative shadow roots#12666

Open
shannonbooth wants to merge 2 commits into
whatwg:mainfrom
shannonbooth:unused
Open

Fix insertion location of <template> for declarative shadow roots#12666
shannonbooth wants to merge 2 commits into
whatwg:mainfrom
shannonbooth:unused

Conversation

@shannonbooth

@shannonbooth shannonbooth commented Jul 9, 2026

Copy link
Copy Markdown
Member

Recomputing the adjusted insertion location after <template> was pushed
onto the stack of open elements caused it to be inserted into itself for
two templates in a row. Fix by reusing the location computed before
<template> is created.

NB: though this area was changed around recently in #12624, this issue existed before that.

(See WHATWG Working Mode: Changes for more details.)


/parsing.html ( diff )

@shannonbooth shannonbooth marked this pull request as draft July 9, 2026 18:13
Comment thread source
@noamr

noamr commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Thanks! Any reason this is marked as a draft?

Recomputing the adjusted insertion location after <template> was pushed
onto the stack of open elements caused it to be inserted into itself for
two templates in a row. Fix by reusing the location computed before
<template> is created.
@shannonbooth

Copy link
Copy Markdown
Member Author

Thanks! Any reason this is marked as a draft?

Due to: #12666 (comment), I've pushed a commit with what I mean but that, just double checking it now. I think I will need to fill out the template and that type of thing, though I think this is the intent of the spec

@shannonbooth shannonbooth changed the title Editorial: Remove unused document variable for fragment parsing Fix insertion location of <template> for declarative shadow roots Jul 13, 2026
@shannonbooth shannonbooth marked this pull request as ready for review July 13, 2026 11:52
@shannonbooth

Copy link
Copy Markdown
Member Author

ok done!

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.

2 participants