On certain audited pages, totalBodyElements
are different from MainDocumentContent
body nodes count
#15920
Closed
2 tasks done
Labels
FAQ
URL
https://www.spie.com/en/about-us/spie-around-world
What happened?
Through a plugin, I want to count SVG child elements.
To do this, I was going to use
MainDocumentContent
, but on the example page, the code is incomplete. When I count the number of elements inbody
, I get a big difference with the DOMStats data (which is good).In my tests, I have :
allBodyNodesFromMainDocumentContent: 1542
artifacts.DOMStats.totalBodyElements: 4651
I'm using JSDOM to browse
MainDocumentContent
, but it's not the JSDOM that's causing the problem - I've checked the contents ofMainDocumentContent
.Here's my code:
What did you expect?
I expect
allBodyNodesFromMainDocumentContent
===artifacts.DOMStats.totalBodyElements
What have you tried?
I tried to find another
gatherers
that would contain the complete HTML code of the page, but I couldn't find anything other thanMainDocumentContent
.How were you running Lighthouse?
node
Lighthouse Version
11.7.0
Chrome Version
linux-121.0.6167.85/chrome-linux64/ (from puppeteer)
Node Version
18.19.1
OS
Linux
Relevant log output
The text was updated successfully, but these errors were encountered: