Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html2canvas is not working fine. it's taking only first screenshot properly and remaining screenshots are coming blank. #3146

Open
harshitverma-dev opened this issue Feb 12, 2024 · 0 comments

Comments

@harshitverma-dev
Copy link

async takeScreenshot() {
let id = "#LqsAnalyser" + this.asinData
html2canvas(document.querySelector(id), { useCORS: true , }).then(function (canvas) {
canvas.style.display = "none"
document.body.appendChild(canvas);
const image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
const a = document.createElement("a");
a.setAttribute("download", "weavr-lqs.png");
a.setAttribute("href", image);
a.click();
});
},

   <span class="ml-2" @click="takeScreenshot"><i class="fa fa-download cursor-pointer text-primary bg-black px-2 py-1 border rounded" aria-hidden="true" ></i>
                </span>

html2canvas is not working fine.
it's taking only first screenshot properly and remaining screenshots are coming blank.
please suggest any solution for this problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant