Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Facades/MenuBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/Facades/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
10 changes: 10 additions & 0 deletions src/MenuBar/MenuBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class MenuBar

protected bool $showOnAllWorkspaces = false;

protected array $webPreferences = [];

protected Client $client;

public function __construct()
Expand Down Expand Up @@ -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 [
Expand All @@ -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,
];
}
}
Loading