Skip to content

Commit 32d006f

Browse files
authored
fix: Add delay to ensure content is rendered before capturing (#770)
1 parent b7adb2f commit 32d006f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/worker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ Worker.prototype.toContainer = function toContainer() {
122122
this.prop.container.appendChild(source);
123123
this.prop.overlay.appendChild(this.prop.container);
124124
document.body.appendChild(this.prop.overlay);
125+
126+
// Delay to better ensure content is fully cloned and rendering before capturing.
127+
return new Promise(resolve => setTimeout(resolve, 10));
125128
});
126129
};
127130

0 commit comments

Comments
 (0)