An example of using the headless browser Puppeteer (https://github.com/puppeteer/puppeteer) to save a dynamic Javascript page as HTML.
I am using a local version of the jstack-review website as my example web page. Just clone their repo (https://github.com/jstack-review/jstack-review) to get the index.html referenced in my example.js.