Merge pull request #7741 from electron/shuffle-bw-docs

Clean up nested objects and string ENUMS in the docs
This commit is contained in:
Zeke Sikelianos 2016-10-25 23:47:32 -07:00 committed by GitHub
commit eed8f201e2
2 changed files with 95 additions and 109 deletions

View file

@ -185,45 +185,18 @@ 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. Default is `default`. Possible values are:
below. * `default` - Results in the standard gray opaque Mac title
bar.
* `hidden` - Results in a hidden title bar and a full size content window, yet
the title bar still has the standard window controls ("traffic lights") in
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.
* `thickFrame` Boolean - Use `WS_THICKFRAME` style for frameless windows on * `thickFrame` Boolean - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`. window shadow and window animations. Default is `true`.
* `webPreferences` Object - Settings of web page's features. See more about * `webPreferences` Object - Settings of web page's features.
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
bar.
* `hidden` results in a hidden title bar and a full size content window, yet
the title bar still has the standard window controls ("traffic lights") in
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:
* `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:

View file

@ -399,11 +399,6 @@ Returns:
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`. Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`.
* `mediaFlags` Object - The flags for the media element the context menu was * `mediaFlags` Object - The flags for the media element the context menu was
invoked on. See more about this below. invoked on. See more about this below.
* `editFlags` Object - These flags indicate whether the renderer believes it is
able to perform the corresponding action. See more about this below.
The `mediaFlags` is an object with the following properties:
* `inError` Boolean - Whether the media element has crashed. * `inError` Boolean - Whether the media element has crashed.
* `isPaused` Boolean - Whether the media element is paused. * `isPaused` Boolean - Whether the media element is paused.
* `isMuted` Boolean - Whether the media element is muted. * `isMuted` Boolean - Whether the media element is muted.
@ -414,9 +409,8 @@ The `mediaFlags` is an object with the following properties:
* `canToggleControls` Boolean - Whether the media element's controls are * `canToggleControls` Boolean - Whether the media element's controls are
toggleable. toggleable.
* `canRotate` Boolean - Whether the media element can be rotated. * `canRotate` Boolean - Whether the media element can be rotated.
* `editFlags` Object - These flags indicate whether the renderer believes it is
The `editFlags` is an object with the following properties: able to perform the corresponding action. See more about this below.
* `canUndo` Boolean - Whether the renderer believes it can undo. * `canUndo` Boolean - Whether the renderer believes it can undo.
* `canRedo` Boolean - Whether the renderer believes it can redo. * `canRedo` Boolean - Whether the renderer believes it can redo.
* `canCut` Boolean - Whether the renderer believes it can cut. * `canCut` Boolean - Whether the renderer believes it can cut.
@ -982,8 +976,8 @@ app.on('ready', () => {
* `parameters` Object * `parameters` Object
* `screenPosition` String - Specify the screen type to emulate * `screenPosition` String - Specify the screen type to emulate
(default: `desktop`) (default: `desktop`)
* `desktop` String - Desktop screen type * `desktop` - Desktop screen type
* `mobile` String - Mobile screen type * `mobile` - Mobile screen type
* `screenSize` Object - Set the emulated screen size (screenPosition == mobile) * `screenSize` Object - Set the emulated screen size (screenPosition == mobile)
* `width` Integer - Set the emulated screen width * `width` Integer - Set the emulated screen width
* `height` Integer - Set the emulated screen height * `height` Integer - Set the emulated screen height
@ -1229,7 +1223,7 @@ Detaches the debugger from the `webContents`.
* `commandParams` Object (optional) - JSON object with request parameters. * `commandParams` Object (optional) - JSON object with request parameters.
* `callback` Function (optional) - Response * `callback` Function (optional) - Response
* `error` Object - Error message indicating the failure of the command. * `error` Object - Error message indicating the failure of the command.
* `result` Object - Response defined by the 'returns' attribute of * `result` Any - Response defined by the 'returns' attribute of
the command description in the remote debugging protocol. the command description in the remote debugging protocol.
Send given command to the debugging target. Send given command to the debugging target.