cnumr / lighthouse-plugin-ecoindex

This plugin is a wrapper of ecoindex for lighthouse.
https://www.npmjs.com/package/lighthouse-plugin-ecoindex
Other
2 stars 1 forks source link

Sur des pages avec du chargement de contenu en JS, le compteur ecoindex est faux #12

Closed hrenaud closed 1 month ago

hrenaud commented 3 months ago

image

test page

https://www.spie.com/fr/propos/spie-dans-le-monde

code

lighthouse-plugin-ecoindex/utils/index.js line 20-26

lib

https://github.com/jsdom/jsdom#readme

lighthouse internal audit

https://github.com/GoogleChrome/lighthouse/blob/main/core/audits/dobetterweb/dom-size.js

hrenaud commented 3 months ago

JSOM n'est pas en cause, c'est MainDocumentContent qui est créé au moment du chargement initial et non pas après être loaded donc dans ce cas, incomplet. Il a été "designé" ainsi (cf. https://github.com/GoogleChrome/lighthouse/issues/15920#event-12362295462).

Solution en cours :

hrenaud commented 1 month ago

Fix dans la release 4.0.0