| CARVIEW |
Select Language
HTTP/2 200
date: Mon, 29 Dec 2025 16:25:56 GMT
content-type: text/html; charset=utf-8
server: cloudflare
last-modified: Sat, 22 Jan 2022 16:56:04 GMT
access-control-allow-origin: *
expires: Mon, 29 Dec 2025 16:21:54 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=%2FMTjU0H03Fp9x7gJqaF6L23b6YK3z0i2Bwpeee6ctY%2F%2BFAqYfVoZuT5cVOz%2Fi41fj7%2Fzqqybld3gpXE3s0QN1sFh7HHc%2BW%2Bq21Q6SBS%2FqYqSjNY%3D"}]}
x-proxy-cache: MISS
x-github-request-id: 8BE4:292AC1:90ED62:A2932C:6952A849
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
age: 0
via: 1.1 varnish
x-served-by: cache-bom-vanm7210073-BOM
x-cache: HIT
x-cache-hits: 0
x-timer: S1767025556.078507,VS0,VE201
vary: Accept-Encoding
x-fastly-request-id: 2275c8648f6491a7b7ba2001430cca956eb99d70
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 9b5aa7fd4b2c252e-BOM
alt-svc: h3=":443"; ma=86400
html2canvas - Screenshots with JavaScript
html2canvas
Screenshots with JavaScript
HTML
<div id="capture" style="padding: 10px; background: #f5da55">
<h4 style="color: #000; ">Hello world!</h4>
</div>
JavaScript
html2canvas(document.querySelector("#capture")).then(canvas => {
document.body.appendChild(canvas)
});
Install NPM
npm install --save html2canvasInstall Yarn
yarn add html2canvas45kb gzipped
Connect
Try out html2canvas
Test out html2canvas by rendering the viewport from the current page.
Capture