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
Log In to Connect With Members
View and follow other members, leave comments & more.
Showcases3D Logo #0E1821.png