File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ class Window
30
30
31
31
protected bool $ showDevTools = false ;
32
32
33
+ protected bool $ devToolsOpen = false ;
34
+
33
35
protected bool $ resizable = true ;
34
36
35
37
protected bool $ movable = true ;
@@ -176,14 +178,36 @@ public function alwaysOnTop($alwaysOnTop = true): self
176
178
return $ this ;
177
179
}
178
180
179
- public function showDevTools ($ showDevTools = true ): self
181
+ public function showDevTools (bool $ showDevTools = true ): self
180
182
{
181
183
$ this ->showDevTools = $ showDevTools ;
182
184
185
+ if (! $ this instanceof PendingOpenWindow) {
186
+ $ this ->client ->post ('window/show-dev-tools ' , [
187
+ 'id ' => $ this ->id ,
188
+ ]);
189
+ }
190
+
191
+ return $ this ;
192
+ }
193
+
194
+ public function hideDevTools (): self
195
+ {
196
+ if (! $ this instanceof PendingOpenWindow) {
197
+ $ this ->client ->post ('window/hide-dev-tools ' , [
198
+ 'id ' => $ this ->id ,
199
+ ]);
200
+ }
201
+
183
202
return $ this ;
184
203
}
185
204
186
- public function resizable ($ resizable = true ): static
205
+ public function devToolsOpen (): bool
206
+ {
207
+ return $ this ->devToolsOpen ;
208
+ }
209
+
210
+ public function resizable (bool $ resizable = true ): static
187
211
{
188
212
$ this ->resizable = $ resizable ;
189
213
You can’t perform that action at this time.
0 commit comments