Easiest way to getBoundingClientRect for a static HTML / headless browser

I’m creating a complex layout in heex (just a template generating some HTML, no Phoenix).
I need to know the size of some of the generated DOM-nodes to make layout decisions.

What would be the way to go to do that?

There seems to be no maintained lib for headless browsers.
The only thing that seems alive is wallaby which does not seem to be able to just load a plain HTML itself.
Also it seems overkill.

Any ideas?

1 Like