diff --git a/src/Windows/Window.php b/src/Windows/Window.php index 92af58b..245ae0b 100644 --- a/src/Windows/Window.php +++ b/src/Windows/Window.php @@ -68,6 +68,8 @@ class Window protected array $webPreferences = []; + protected float $zoomFactor = 1.0; + public function __construct(string $id) { $this->id = $id; @@ -326,6 +328,20 @@ public function webPreferences(array $preferences): static return $this; } + public function zoomFactor(float $zoomFactor = 1.0): self + { + $this->zoomFactor = $zoomFactor; + + if (! $this instanceof PendingOpenWindow) { + $this->client->post('window/set-zoom-factor', [ + 'id' => $this->id, + 'zoomFactor' => $zoomFactor, + ]); + } + + return $this; + } + public function toArray() { return [ @@ -364,6 +380,7 @@ public function toArray() 'autoHideMenuBar' => $this->autoHideMenuBar, 'transparent' => $this->transparent, 'webPreferences' => $this->webPreferences, + 'zoomFactor' => $this->zoomFactor, ]; }