We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when i run this: var html = '<!--comment --><html><body><head></head></body></html>' var tree = gumbo(html);
var html = '<!--comment --><html><body><head></head></body></html>' var tree = gumbo(html);
tree.root.nodeType is 8,is it right?
The text was updated successfully, but these errors were encountered:
I'm sorry i have completely missed your issue, this is quite interesting actually! The W3C spec says
The root element of a Document object is that Document's first element child, if any. If it does not have one then the Document has no root element.
This seems to me that a document can have more than 1 root element, and that the comment is root because it's the first child of document.
From the WhatWG spec i can't find that it would be either right or wrong.
Sorry, something went wrong.
No branches or pull requests
when i run this:
var html = '<!--comment --><html><body><head></head></body></html>' var tree = gumbo(html);
tree.root.nodeType is 8,is it right?
The text was updated successfully, but these errors were encountered: