Would there be negative consequences, if ports were to allow VirtualDom.node to pass through?

VirtualDom.node is an opaque type. The main advantage of opaque types is that you are shielded from any change in the implementation. Serializing such an opaque type would mean that you would expose the implementation which would tie you to the implementation.

Maybe it’s a bit more heavyweight than you were hoping for, but sounds like a headless browser/browser automation tool would work? I’ve used Selenium + headless Chrome/Firefox before, there’s PhantomJS and a bunch of others I’ve never used, too. Send out a message through a port when everything’s rendered, so you know when to capture the page source.