Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run adopt as part of insert #25265

Open
jdm opened this issue Dec 12, 2019 · 3 comments
Open

Run adopt as part of insert #25265

jdm opened this issue Dec 12, 2019 · 3 comments
Labels
A-content/dom Interacting with the DOM from web content I-spec-update

Comments

@jdm
Copy link
Member

jdm commented Dec 12, 2019

whatwg/dom#754

@jdm jdm added A-content/dom Interacting with the DOM from web content I-spec-update labels Dec 12, 2019
@pshaughn pshaughn self-assigned this Jan 7, 2020
@pshaughn
Copy link
Member

pshaughn commented Jan 7, 2020

This is bigger than I thought, but I think I can still do it. Challenges here:

  • The concept of a document fragments' "host" element is directly exposed in ShadowRoot, but needs to actually be stored in DocumentFragment so that template elements can also use it; this makes the layout getter for it slightly more elaborate. (@jdm got me past the tricky parts of this in IRC)
  • Insert code is putting a script blocker on the owner document at the start and taking a script blocker off the owner document at the end; now that adoption is happening in mid-insert the owner document isn't actually the same document in these two places, leading to a crash.
  • At least one debug assertion about nodes sharing an owner doc during the insert process is false now.

@pshaughn
Copy link
Member

pshaughn commented Jan 7, 2020

^ This PR moves adopt to where the spec says to move it, and adds the host-element check, but it's not passing as many tests as it seems like it should.

@pshaughn
Copy link
Member

whatwg/dom#819 suggests this is not going to happen, or if it does happen it will be written a totally different way.

@pshaughn pshaughn removed their assignment Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content I-spec-update
Projects
None yet
Development

No branches or pull requests

2 participants