Closed connorjclark closed 2 months ago
Could it be a standalone function that these files could import and that dom.js
could use as well? Feels weird to pull in and instantiate all of DOM
for this one function that's not static only for (extremely) historical reasons.
That's a reasonable further refactor. Note that treemap uses createElement/createChildOf too.
fixes https://github.com/GoogleChrome/lighthouse/issues/11992
This reduces 4 instances of
find
to 1. I also adopted treemap's default second param to the canonical instance inDOM
.