File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 18
18
* @method static void maximize($id = null)
19
19
* @method static void minimize($id = null)
20
20
* @method static void zoomFactor(float $zoomFactor = 1.0)
21
+ * @method static void preventLeaveDomain(bool $preventLeaveDomain = true)
22
+ * @method static void preventLeavePage(bool $preventLeavePage = true): self
21
23
*/
22
24
class Window extends Facade
23
25
{
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ class Window
70
70
71
71
protected float $ zoomFactor = 1.0 ;
72
72
73
+ protected bool $ preventLeaveDomain = false ;
74
+
75
+ protected bool $ preventLeavePage = false ;
76
+
73
77
public function __construct (string $ id )
74
78
{
75
79
$ this ->id = $ id ;
@@ -342,6 +346,20 @@ public function zoomFactor(float $zoomFactor = 1.0): self
342
346
return $ this ;
343
347
}
344
348
349
+ public function preventLeaveDomain (bool $ preventLeaveDomain = true ): self
350
+ {
351
+ $ this ->preventLeaveDomain = $ preventLeaveDomain ;
352
+
353
+ return $ this ;
354
+ }
355
+
356
+ public function preventLeavePage (bool $ preventLeavePage = true ): self
357
+ {
358
+ $ this ->preventLeavePage = $ preventLeavePage ;
359
+
360
+ return $ this ;
361
+ }
362
+
345
363
public function toArray ()
346
364
{
347
365
return [
@@ -381,6 +399,8 @@ public function toArray()
381
399
'transparent ' => $ this ->transparent ,
382
400
'webPreferences ' => $ this ->webPreferences ,
383
401
'zoomFactor ' => $ this ->zoomFactor ,
402
+ 'preventLeaveDomain ' => $ this ->preventLeaveDomain ,
403
+ 'preventLeavePage ' => $ this ->preventLeavePage ,
384
404
];
385
405
}
386
406
You can’t perform that action at this time.
0 commit comments