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:
Samuel Attard 2016-10-26 12:52:40 +11:00
parent e97d3c21a3
commit 7078ed80fa
No known key found for this signature in database
GPG key ID: 273DC1869D8F13EF

View file

@ -185,35 +185,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
Default is `false`. Default is `false`.
* `type` String - The type of window, default is normal window. See more about * `type` String - The type of window, default is normal window. See more about
this below. this below.
* `titleBarStyle` String - The style of window title bar. See more about this * `titleBarStyle` String - The style of window title bar. Possible values are:
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:
* `default` or not specified, results in the standard gray opaque Mac title * `default` or not specified, results in the standard gray opaque Mac title
bar. bar.
* `hidden` results in a hidden title bar and a full size content window, yet * `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. the top left.
* `hidden-inset` results in a hidden title bar with an alternative look * `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. where the traffic light buttons are slightly more inset from the window edge.
* `thickFrame` Boolean - Use `WS_THICKFRAME` style for frameless windows on
The `webPreferences` option is an object that can have the following properties: 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`. * `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 * `nodeIntegration` Boolean - Whether node integration is enabled. Default
is `true`. is `true`.
@ -291,6 +264,25 @@ The `webPreferences` option is an object that can have the following properties:
window. Defaults to `false`. window. Defaults to `false`.
* `sandbox` Boolean - Whether to enable Chromium OS-level sandbox. * `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 ### Instance Events
Objects created with `new BrowserWindow` emit the following events: Objects created with `new BrowserWindow` emit the following events: