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

The HTML parser creates two nodes with tag=html #219

Closed
burg opened this issue Nov 19, 2012 · 3 comments
Closed

The HTML parser creates two nodes with tag=html #219

burg opened this issue Nov 19, 2012 · 3 comments

Comments

@burg
Copy link

@burg burg commented Nov 19, 2012

One of them seems to correspond to nothing, and has the Doctype node and HTMLHtmlElement as children. The other represents the HTMLHtmlElement itself.

Unless there's some way to query the doctype node through the tree structure from script, we should save doctype somewhere and submit the HTMLHtmlElement node to layout as the document root.

@bzbarsky
Copy link
Contributor

@bzbarsky bzbarsky commented Nov 20, 2012

Script can most certainly get at the http://dom.spec.whatwg.org/#interface-documenttype

@bzbarsky
Copy link
Contributor

@bzbarsky bzbarsky commented Nov 20, 2012

But for purposes of layout, of course, the doctype is irrelevant. The "nothing" node you have there is also reachable from script. It's http://dom.spec.whatwg.org/#interface-document

@jdm
Copy link
Member

@jdm jdm commented Nov 19, 2013

This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.