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

Why do we pass oldDocument to "adopting steps" (instead of the new document)? #896

Closed
rakina opened this issue Sep 24, 2020 · 2 comments
Closed

Comments

@rakina
Copy link
Member

rakina commented Sep 24, 2020

The adopt actually has node and document as its parameters - where document is the new document that we intend to adopt node into. We get oldDocument in that algorithm from node. However, the adopting steps is passed node and oldDocument - I wonder if we meant document instead of oldDocument here? Otherwise, I'm not sure how we can get the new document from within adopting steps.

Noticed this while looking into an issue with constructed stylesheets.

@annevk
Copy link
Member

annevk commented Sep 24, 2020

By the time step 3.3 of adopt runs (that invokes adopting steps) the node's node document is the new document, right? I.e., you can obtain that from node.

@rakina
Copy link
Member Author

rakina commented Sep 24, 2020

Oh you're right! Should've read it more thoroughly. Thank you :)

@rakina rakina closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants