Skip to content

Commit e9f08bd

Browse files
committed
add configurable webpreferences
1 parent 158b830 commit e9f08bd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MenuBar/MenuBar.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class MenuBar
3434

3535
protected bool $showOnAllWorkspaces = false;
3636

37+
protected array $webPreferences = [];
38+
3739
protected Client $client;
3840

3941
public function __construct()
@@ -111,6 +113,13 @@ public function withContextMenu(Menu $menu): self
111113
return $this;
112114
}
113115

116+
public function webPreferences(array $preferences): static
117+
{
118+
$this->webPreferences = $preferences;
119+
120+
return $this;
121+
}
122+
114123
public function toArray(): array
115124
{
116125
return [
@@ -132,6 +141,7 @@ public function toArray(): array
132141
'contextMenu' => ! is_null($this->contextMenu) ? $this->contextMenu->toArray()['submenu'] : null,
133142
'alwaysOnTop' => $this->alwaysOnTop,
134143
'showOnAllWorkspaces' => $this->showOnAllWorkspaces,
144+
'webPreferences' => $this->webPreferences,
135145
];
136146
}
137147
}

0 commit comments

Comments
 (0)