fix(screenshot): avoid unnecessary work (#16035)
Do not evaluate when not hiding caret nor disabling animations.
This commit is contained in:
parent
e07eb664a5
commit
03b0f911d9
|
|
@ -140,6 +140,9 @@ export class Screenshotter {
|
||||||
}
|
}
|
||||||
|
|
||||||
async _preparePageForScreenshot(progress: Progress, hideCaret: boolean, disableAnimations: boolean) {
|
async _preparePageForScreenshot(progress: Progress, hideCaret: boolean, disableAnimations: boolean) {
|
||||||
|
if (!hideCaret && !disableAnimations)
|
||||||
|
return;
|
||||||
|
|
||||||
if (disableAnimations)
|
if (disableAnimations)
|
||||||
progress.log(' disabled all CSS animations');
|
progress.log(' disabled all CSS animations');
|
||||||
await Promise.all(this._page.frames().map(async frame => {
|
await Promise.all(this._page.frames().map(async frame => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue