snapshot-url
v0.0.5
Published
A node.js library for rendering HTML from URLs after loading assets on the page (images, javascript).
Downloads
10
Readme
snapshot-url
A node.js library for rendering HTML from URLs after loading assets on the page (images, javascript).
Lightweight wrappers around:
Example usage:
const { Snapshot } = require('snapshot-url');
const url = 'file:///tmp/build/index.html';
const snapshot = new Snapshot(url);
const dom = await snapshot.renderDOM();
const document = dom.window.document;
const finalHtml = snapshot.getHtml({ prettyPrint: true });
License
MIT