Open Bug 1602200 Opened 6 years ago Updated 3 years ago

Adoption and DocumentFragment

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

People

(Reporter: annevk, Unassigned)

References

Details

We need to make various changes to how we deal with adoption, in particular of DocumentFragment.

See https://github.com/whatwg/dom/pull/754 and https://github.com/web-platform-tests/wpt/pull/16348 (not merged yet, see bug 1602198 for wpt-sync).

Priority: -- → P3

I have a patch on my local, so put this bug in my queue. I'll take care of it. :)

Assignee: nobody → jdai
Status: NEW → ASSIGNED

I posted a new fix at https://github.com/whatwg/dom/pull/819 that I'd appreciate review on.

Assignee: jdai → nobody
Status: ASSIGNED → NEW
No longer blocks: custom-elements
See Also: → 1685333
Severity: normal → S3

To note that this creates a webcompat issue for a JS library, and that WebKit might need to revert the implementation.
See the discussions in https://github.com/whatwg/dom/pull/819
and https://github.com/aurelia/framework/issues/1003
https://bugs.webkit.org/show_bug.cgi?id=204980

Chromium bug is:
https://bugs.chromium.org/p/chromium/issues/detail?id=1031811

As of today
https://bug-246899-attachments.webkit.org/attachment.cgi?id=463188

STP 164

fragment.ownerDocument.documentElement: null
Then document.adoptNode(fragment);
fragment.ownerDocument.documentElement null

Firefox Nightly 112.0a1 (2023-03-02)

fragment.ownerDocument.documentElement: null
Then document.adoptNode(fragment);
fragment.ownerDocument.documentElement [object HTMLHtmlElement]

Chrome Canary 113.0.5627.0

fragment.ownerDocument.documentElement: null
Then document.adoptNode(fragment);
fragment.ownerDocument.documentElement [object HTMLHtmlElement]

You need to log in before you can comment on or make changes to this bug.