phantomjs // render webpage from give dom


is there any chance to render/process a webpage just from the given DOM?
At the moment we can use but just with a url. In my app i've got the DOM from somewhere else so there is no need to get it twice :)

I now that you can set the page content via page.content = "<html></html>" but i'm missing the callback for loaded images, etc.

Any Ideas out there?

Problem courtesy of: Jörn


Have a look at casperjs' bbcshot.js code sample, it does quite exactly what you're asking for.

Solution courtesy of: NiKo


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.