Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How To Take Screenshots In The Browser Using JavaScript

const screenshotTarget = document.body;

html2canvas(screenshotTarget).then((canvas) => {
    const base64image = canvas.toDataURL("image/png");
    window.location.href = base64image;
});
Source by hackernoon.com #
 
PREVIOUS NEXT
Tagged: #How #To #Take #Screenshots #In #The #Browser #Using #JavaScript
ADD COMMENT
Topic
Name
5+4 =