You can install html2canvas through npm or download a built release.
npm install html2canvasimport html2canvas from 'html2canvas';To render an element with html2canvas with some (optional) options, simply call html2canvas(element, options);
html2canvas(document.body).then(function(canvas) {
document.body.appendChild(canvas);
});Test out html2canvas by rendering the viewport from the current page.