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

Documents never have their node document set? #1178

Closed
jyasskin opened this issue Mar 29, 2023 · 1 comment
Closed

Documents never have their node document set? #1178

jyasskin opened this issue Mar 29, 2023 · 1 comment

Comments

@jyasskin
Copy link
Member

Sorry if I'm just failing at reading the specification, but I couldn't find where a document node's node document is initialized. Neither new Document() nor createHTMLDocument() mention it.

This would normally be an odd thing to want, since the document's node document is always itself, but we're traversing that edge when we want to get the node navigable of a Document, like in https://html.spec.whatwg.org/#doc-container-document.

@annevk
Copy link
Member

annevk commented Mar 30, 2023

I think you are correct. I'd suggest adding a paragraph below https://dom.spec.whatwg.org/#concept-document:

A document's node document is itself.

jyasskin added a commit to jyasskin/dom that referenced this issue Mar 30, 2023
@annevk annevk closed this as completed in fb0bf26 Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants