I would like to know if there is any way to make a screenshot
using javascript
, I have found how to make a screenshot
one url
but what I need is to capture the screen that the user is seeing.
Thanks in advance.
I would like to know if there is any way to make a screenshot
using javascript
, I have found how to make a screenshot
one url
but what I need is to capture the screen that the user is seeing.
Thanks in advance.
Making a screenshot is a native behavior of the operating system, therefore, from your browser you cannot access it. What you can do is transform the HTML document to canvas and then to a URL using the
toDataURL()
.The following example makes use of the html2canvas library .
If you want it to download automatically just call the function
click
on the link (link.click()
).