This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = '//html2canvas.hertzen.com/dist/html2canvas.min.js'; | |
document.head.appendChild(script); | |
window.onerror = async function () { | |
const { 0: errorMessage, 1: fileName, 2: lineNumber, 3: columnNumber, 4: errorObj } = arguments; | |
if (typeof html2canvas === 'function') { | |
html2canvas(document.body, { scale: 1.0 }).then(async (canvas) => { | |
const base64image = canvas.toDataURL('image/png'); | |
let imageData = base64image.split('base64,'); |