Skip to content

Adopt a DocumentFragment with a host like any other node - #1486

Merged
annevk merged 1 commit into
mainfrom
adopt-documentfragment-host
Jul 9, 2026
Merged

Adopt a DocumentFragment with a host like any other node#1486
annevk merged 1 commit into
mainfrom
adopt-documentfragment-host

Conversation

@annevk

@annevk annevk commented Jul 8, 2026

Copy link
Copy Markdown
Member

adoptNode() previously short-circuited for a DocumentFragment whose host is non-null (i.e. a template's content) with a bare "return", which both contradicted the Node return type and matched no implementation. All engines instead adopt the fragment and return it, so remove the step.

Tests: web-platform-tests/wpt#61140.

Fixes #813.


Preview | Diff

adoptNode() previously short-circuited for a DocumentFragment whose host
is non-null (i.e. a template's content) with a bare "return", which both
contradicted the Node return type and matched no implementation. All
engines instead adopt the fragment and return it, so remove the step.

Tests: web-platform-tests/wpt#61140.

Fixes #813.
@annevk
annevk requested a review from smaug---- July 8, 2026 15:21
@smaug----

Copy link
Copy Markdown
Contributor

Can't figure out why it was ever added #744

@annevk
annevk merged commit 4e0a5a2 into main Jul 9, 2026
2 checks passed
@annevk
annevk deleted the adopt-documentfragment-host branch July 9, 2026 10:20
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.

What does adoptNode() return for DocumentFragment?

2 participants