I would like to know if there is any way to make a screenshot using javascript, I found how to make a screenshot of the whole screen but what I need is to capture only what is contained in a div.
Maybe you can help me modify the script, thanks in advance. html2canvas is used. The script is as follows:
html2canvas(document.body, { onrendered (canvas) {
var link = document.getElementById('descargar');;
var image = canvas.toDataURL();
link.href = image;
link.download = 'carputarpantalla.png'; } });