This commit is contained in:
Timothy Jaeryang Baek
2026-05-09 06:34:03 +09:00
parent 1d892ce2c5
commit 1baf73bdd5
4 changed files with 40 additions and 4 deletions
+2 -2
View File
@@ -105,8 +105,8 @@
el.style.contentVisibility = 'visible';
});
// Wait for DOM update/layout
await new Promise((r) => setTimeout(r, 100));
// Let the browser compute layout for the cloned element
await new Promise((r) => requestAnimationFrame(r));
// Render entire content once
const canvas = await html2canvas(clonedElement, {
@@ -117,8 +117,8 @@
el.style.contentVisibility = 'visible';
});
// Wait for DOM update/layout
await new Promise((r) => setTimeout(r, 100));
// Let the browser compute layout for the cloned element
await new Promise((r) => requestAnimationFrame(r));
// Render entire content once
const canvas = await html2canvas(clonedElement, {