function takeScreenshot() { var screen = document.createElement("canvas"); var width = window.innerWidth; var height = window.innerHeight; screen.width = width; screen.height = height; var ctx = screen.getContext("2d"); ctx.drawImage(document.body, 0, 0, width, height); var img = new Image(); img.src = screen.toDataURL("image/png"); // Save the screenshot to the device's photo gallery navigator.clipboard.writeText(img.src); }
top of page

Portfolio

bottom of page