diff --git a/src/Page.php b/src/Page.php index 3e7180e..fbb3fd4 100644 --- a/src/Page.php +++ b/src/Page.php @@ -691,11 +691,11 @@ public function screenshot(array $options = []): PageScreenshot return new PageScreenshot($responseReader); } - public function screenshotElement(Node $node): PageScreenshot + public function screenshotElement(Node $node, array $options = []): PageScreenshot { - return $this->screenshot([ - 'clip' => $node->getClip(), - ]); + // todo: invalidArgumentException if ['clip'] is already present? + $options['clip'] = $node->getClip(); + return $this->screenshot($options); } /**