Skip to content

Commit b1a505d

Browse files
Add parameter captureBeyondViewport to screenshot (#203)
Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
1 parent 9a59629 commit b1a505d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Page.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ public function getFullPageClip(int $timeout = null): Clip
435435
* - format: "png"|"jpg" default "png"
436436
* - quality: number from 0 to 100. Only for jpegs
437437
* - clip: instance of a Clip to choose an area for the screenshot
438+
* - captureBeyondViewport: whether to capture the screenshot beyond the viewport. Defaults to false
438439
*
439440
* @return PageScreenshot
440441
* @throws CommunicationException
@@ -445,6 +446,10 @@ public function screenshot(array $options = []): PageScreenshot
445446

446447
$screenshotOptions = [];
447448

449+
if (array_key_exists('captureBeyondViewport', $options)) {
450+
$screenshotOptions['captureBeyondViewport'] = $options['captureBeyondViewport'];
451+
}
452+
448453
// get format
449454
if (array_key_exists('format', $options)) {
450455
$screenshotOptions['format'] = $options['format'];

0 commit comments

Comments
 (0)