Move webPreferences
and titleBarStyle
to the correct place in the docs
In their previous location `electron-docs-linter` would not output an Object structure for `webPreferences` (which is a key part of the constructor)
This commit is contained in:
parent
e97d3c21a3
commit
7078ed80fa
1 changed files with 75 additions and 83 deletions
|
@ -185,35 +185,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
|||
Default is `false`.
|
||||
* `type` String - The type of window, default is normal window. See more about
|
||||
this below.
|
||||
* `titleBarStyle` String - The style of window title bar. See more about this
|
||||
below.
|
||||
* `thickFrame` Boolean - Use `WS_THICKFRAME` style for frameless windows on
|
||||
Windows, which adds standard window frame. Setting it to `false` will remove
|
||||
window shadow and window animations. Default is `true`.
|
||||
* `webPreferences` Object - Settings of web page's features. See more about
|
||||
this below.
|
||||
|
||||
When setting minimum or maximum window size with `minWidth`/`maxWidth`/
|
||||
`minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from
|
||||
passing a size that does not follow size constraints to `setBounds`/`setSize` or
|
||||
to the constructor of `BrowserWindow`.
|
||||
|
||||
The possible values and behaviors of the `type` option are platform dependent.
|
||||
Possible values are:
|
||||
|
||||
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
|
||||
`notification`.
|
||||
* On macOS, possible types are `desktop`, `textured`.
|
||||
* The `textured` type adds metal gradient appearance
|
||||
(`NSTexturedBackgroundWindowMask`).
|
||||
* The `desktop` type places the window at the desktop background window level
|
||||
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
|
||||
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
|
||||
input sparingly.
|
||||
* On Windows, possible type is `toolbar`.
|
||||
|
||||
Possible values of the `titleBarStyle` option are:
|
||||
|
||||
* `titleBarStyle` String - The style of window title bar. Possible values are:
|
||||
* `default` or not specified, results in the standard gray opaque Mac title
|
||||
bar.
|
||||
* `hidden` results in a hidden title bar and a full size content window, yet
|
||||
|
@ -221,9 +193,10 @@ Possible values of the `titleBarStyle` option are:
|
|||
the top left.
|
||||
* `hidden-inset` results in a hidden title bar with an alternative look
|
||||
where the traffic light buttons are slightly more inset from the window edge.
|
||||
|
||||
The `webPreferences` option is an object that can have the following properties:
|
||||
|
||||
* `thickFrame` Boolean - Use `WS_THICKFRAME` style for frameless windows on
|
||||
Windows, which adds standard window frame. Setting it to `false` will remove
|
||||
window shadow and window animations. Default is `true`.
|
||||
* `webPreferences` Object - Settings of web page's features.
|
||||
* `devTools` Boolean - Whether to enable DevTools. If it is set to `false`, can not use `BrowserWindow.webContents.openDevTools()` to open DevTools. Default is `true`.
|
||||
* `nodeIntegration` Boolean - Whether node integration is enabled. Default
|
||||
is `true`.
|
||||
|
@ -291,6 +264,25 @@ The `webPreferences` option is an object that can have the following properties:
|
|||
window. Defaults to `false`.
|
||||
* `sandbox` Boolean - Whether to enable Chromium OS-level sandbox.
|
||||
|
||||
When setting minimum or maximum window size with `minWidth`/`maxWidth`/
|
||||
`minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from
|
||||
passing a size that does not follow size constraints to `setBounds`/`setSize` or
|
||||
to the constructor of `BrowserWindow`.
|
||||
|
||||
The possible values and behaviors of the `type` option are platform dependent.
|
||||
Possible values are:
|
||||
|
||||
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
|
||||
`notification`.
|
||||
* On macOS, possible types are `desktop`, `textured`.
|
||||
* The `textured` type adds metal gradient appearance
|
||||
(`NSTexturedBackgroundWindowMask`).
|
||||
* The `desktop` type places the window at the desktop background window level
|
||||
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
|
||||
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
|
||||
input sparingly.
|
||||
* On Windows, possible type is `toolbar`.
|
||||
|
||||
### Instance Events
|
||||
|
||||
Objects created with `new BrowserWindow` emit the following events:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue