diff --git a/src/Facades/MenuBar.php b/src/Facades/MenuBar.php index b1d4972c..f11d60eb 100644 --- a/src/Facades/MenuBar.php +++ b/src/Facades/MenuBar.php @@ -14,6 +14,7 @@ * @method static void icon(string $icon) * @method static void resize(int $width, int $height) * @method static void contextMenu(Menu $contextMenu) + * @method static void webPreferences(array $preferences) */ class MenuBar extends Facade { diff --git a/src/Facades/Window.php b/src/Facades/Window.php index 0c8b1f84..5e44792d 100644 --- a/src/Facades/Window.php +++ b/src/Facades/Window.php @@ -21,6 +21,7 @@ * @method static void preventLeaveDomain(bool $preventLeaveDomain = true) * @method static void preventLeavePage(bool $preventLeavePage = true): self * @method static void suppressNewWindows() + * @method static void webPreferences(array $preferences) */ class Window extends Facade { diff --git a/src/MenuBar/MenuBar.php b/src/MenuBar/MenuBar.php index c3b6ce8a..26354afd 100644 --- a/src/MenuBar/MenuBar.php +++ b/src/MenuBar/MenuBar.php @@ -34,6 +34,8 @@ class MenuBar protected bool $showOnAllWorkspaces = false; + protected array $webPreferences = []; + protected Client $client; public function __construct() @@ -111,6 +113,13 @@ public function withContextMenu(Menu $menu): self return $this; } + public function webPreferences(array $preferences): static + { + $this->webPreferences = $preferences; + + return $this; + } + public function toArray(): array { return [ @@ -132,6 +141,7 @@ public function toArray(): array 'contextMenu' => ! is_null($this->contextMenu) ? $this->contextMenu->toArray()['submenu'] : null, 'alwaysOnTop' => $this->alwaysOnTop, 'showOnAllWorkspaces' => $this->showOnAllWorkspaces, + 'webPreferences' => $this->webPreferences, ]; } }