Skip to content

Commit 6622b33

Browse files
committed
target v2 branch
1 parent 6fc11c9 commit 6622b33

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

resources/views/docs/desktop/1/the-basics/menu-bar.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -252,21 +252,6 @@ MenuBar::create()
252252

253253
To learn more about the `Menu` facade, please refer to the [Application Menu](/docs/the-basics/application-menu) documentation.
254254

255-
### Setting webpage features
256-
257-
You may control various web page features by passing an optional `webPreferences` configuration array, similar to how it works with [Windows](/docs/the-basics/windows#setting-webpage-features). This allows you to customize how the menu bar window behaves and what features are available to the web content.
258-
259-
```php
260-
MenuBar::create()
261-
->webPreferences([
262-
'nodeIntegration' => true,
263-
'spellcheck' => true,
264-
'backgroundThrottling' => true,
265-
]);
266-
```
267-
268-
The same defaults and restrictions apply as with Windows. For more details about available options and default settings, see the [Windows documentation](/docs/the-basics/windows#setting-webpage-features).
269-
270255
## Events
271256

272257
NativePHP provides a simple way to listen for menu bar events.
@@ -313,4 +298,4 @@ The `Native\Laravel\Events\MenuBar\MenuBarContextMenuOpened` event will be dispa
313298
Show only the context menu without opening a window when the menu bar icon is clicked:
314299
```php
315300
MenuBar::onlyShowContextMenu();
316-
```
301+
```

resources/views/docs/desktop/1/the-basics/windows.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -468,36 +468,6 @@ In order to keep the window draggable, you should add an HTML element with the f
468468
</div>
469469
```
470470

471-
### Setting webpage features
472-
473-
You may control various web page features by passing an optional `webPreferences` configuration array. This allows you to customize how the Electron window behaves and what features are available to the web content.
474-
475-
```php
476-
Window::open()
477-
->webPreferences([
478-
'nodeIntegration' => true,
479-
'spellcheck' => true,
480-
'backgroundThrottling' => true,
481-
]);
482-
```
483-
484-
#### Default Settings
485-
486-
NativePHP sets the following defaults for security and compatibility:
487-
488-
```php
489-
[
490-
'sandbox' => false, // locked
491-
'preload' => '{preload-path}', // locked
492-
'contextIsolation' => true, // locked
493-
'spellcheck' => false,
494-
'nodeIntegration' => false,
495-
'backgroundThrottling' => false,
496-
]
497-
```
498-
499-
The `preload`, `contextIsolation`, and `sandbox` options are locked and cannot be changed for security reasons. All other options from the [Electron WebPreferences documentation](https://www.electronjs.org/docs/latest/api/structures/web-preferences) may be passed and will override the defaults.
500-
501471
## Events
502472

503473
NativePHP provides a simple way to listen for native window events.

resources/views/docs/desktop/2/the-basics/menu-bar.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,21 @@ MenuBar::create()
252252

253253
To learn more about the `Menu` facade, please refer to the [Application Menu](/docs/the-basics/application-menu) documentation.
254254

255+
### Setting webpage features
256+
257+
You may control various web page features by passing an optional `webPreferences` configuration array, similar to how it works with [Windows](/docs/the-basics/windows#setting-webpage-features). This allows you to customize how the menu bar window behaves and what features are available to the web content.
258+
259+
```php
260+
MenuBar::create()
261+
->webPreferences([
262+
'nodeIntegration' => true,
263+
'spellcheck' => true,
264+
'backgroundThrottling' => true,
265+
]);
266+
```
267+
268+
The same defaults and restrictions apply as with Windows. For more details about available options and default settings, see the [Windows documentation](/docs/the-basics/windows#setting-webpage-features).
269+
255270
## Events
256271

257272
NativePHP provides a simple way to listen for menu bar events.

resources/views/docs/desktop/2/the-basics/windows.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,36 @@ In order to keep the window draggable, you should add an HTML element with the f
469469
</div>
470470
```
471471

472+
### Setting webpage features
473+
474+
You may control various web page features by passing an optional `webPreferences` configuration array. This allows you to customize how the Electron window behaves and what features are available to the web content.
475+
476+
```php
477+
Window::open()
478+
->webPreferences([
479+
'nodeIntegration' => true,
480+
'spellcheck' => true,
481+
'backgroundThrottling' => true,
482+
]);
483+
```
484+
485+
#### Default Settings
486+
487+
NativePHP sets the following defaults for security and compatibility:
488+
489+
```php
490+
[
491+
'sandbox' => false, // locked
492+
'preload' => '{preload-path}', // locked
493+
'contextIsolation' => true, // locked
494+
'spellcheck' => false,
495+
'nodeIntegration' => false,
496+
'backgroundThrottling' => false,
497+
]
498+
```
499+
500+
The `preload`, `contextIsolation`, and `sandbox` options are locked and cannot be changed for security reasons. All other options from the [Electron WebPreferences documentation](https://www.electronjs.org/docs/latest/api/structures/web-preferences) may be passed and will override the defaults.
501+
472502
## Events
473503

474504
NativePHP provides a simple way to listen for native window events.

0 commit comments

Comments
 (0)