Reputation: 135
I know, that you can do screenshot of website in chrome extensions wit this:
chrome.tabs.captureVisibleTab(null, {format: 'png'}, capturedImage);
But is this possible with just in javascript? I tried js plugin html2canvas, but these screenshots are terrible. My website is fulled with transitions/animations, 3D transforms... And that html2canvas is unable to make screenshot of that.
But I found chrome extension, which makes screenshot of website and that extension has made perfect job. Then I looked into extension's script and found that function captureVisibleTab
.
Hope you know, what's my point. Do you know, how can I access to chrome.tabs
? Or some other way, to use chrome's capture system?
EDIT: To compare original website and screenshot from html2canvas:
Upvotes: 1
Views: 1045
Reputation: 77523
No, you can't.
It's a highly privileged API, and only an extension which was explicitly granted an extremely high access permission "<all_urls>"
can use it.
Upvotes: 2