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 1818 * @method static void maximize($id = null)
1919 * @method static void minimize($id = null)
2020 * @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
2123 */
2224class Window extends Facade
2325{
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ class Window
7070
7171 protected float $ zoomFactor = 1.0 ;
7272
73+ protected bool $ preventLeaveDomain = false ;
74+
75+ protected bool $ preventLeavePage = false ;
76+
7377 public function __construct (string $ id )
7478 {
7579 $ this ->id = $ id ;
@@ -342,6 +346,20 @@ public function zoomFactor(float $zoomFactor = 1.0): self
342346 return $ this ;
343347 }
344348
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+
345363 public function toArray ()
346364 {
347365 return [
@@ -381,6 +399,8 @@ public function toArray()
381399 'transparent ' => $ this ->transparent ,
382400 'webPreferences ' => $ this ->webPreferences ,
383401 'zoomFactor ' => $ this ->zoomFactor ,
402+ 'preventLeaveDomain ' => $ this ->preventLeaveDomain ,
403+ 'preventLeavePage ' => $ this ->preventLeavePage ,
384404 ];
385405 }
386406
You can’t perform that action at this time.
0 commit comments