We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bc945a commit 5d5d65fCopy full SHA for 5d5d65f
src/element_handle.ts
@@ -293,11 +293,13 @@ export class ElementHandle {
293
);
294
}
295
296
+ const { cssLayoutViewport } = await this.#celestial.Page.getLayoutMetrics();
297
+
298
return await this.#page.screenshot({
299
...opts,
300
clip: {
- x: boxModel.border[0].x,
- y: boxModel.border[0].y,
301
+ x: boxModel.border[0].x + cssLayoutViewport.pageX,
302
+ y: boxModel.border[0].y + cssLayoutViewport.pageY,
303
width: boxModel.border[2].x - boxModel.border[0].x,
304
height: boxModel.border[2].y - boxModel.border[0].y,
305
scale: opts?.scale ?? 1,
0 commit comments