-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Dom Size fails when no body present #8725
Comments
Nice catch!! FWIW, this also fails when i.e. |
I was trying to upload a repro for this to surge but Chrome keeps being smart. https://misc-hoten.surge.sh/the-incorporeal-doc/
|
Rather, the html parser spec is very particular about what to do here: http://w3c.github.io/html/syntax.html#the-before-head-insertion-mode initial -> before html -> before head -> in head -> after head -> in body -> voila. |
Anyways, my point is, how are you guys even getting this error to happen? I can't audit a document without a body, because apparently the spec never allows Chrome to make such a document. |
yes, one is automatically created. @patrickhulce pinpointed the actual issue (an empty body) |
This issue #6806 brought up counting elements in the HEAD, and this PR was made #7241. But it fails to count dom elements in a website like this:
Where there are no
<body>
tags present, but there are nodes to count.The text was updated successfully, but these errors were encountered: