Browse Source

Merge pull request #6932 from electron/fix-power-save-blocker-doc-bug

Fix some invalid docs
Kevin Sawicki 8 years ago
parent
commit
e84d0ebb7e

+ 1 - 1
docs/api/browser-window.md

@@ -1058,7 +1058,7 @@ The `flags` is an array that can include following `String`s:
 
 #### `win.setThumbnailClip(region)` _Windows_
 
-* `region` - Object
+* `region` Object - Region of the window
   * `x` Integer - x-position of region
   * `y` Integer - y-position of region
   * `width` Integer - width of region

+ 1 - 1
docs/api/menu-item.md

@@ -8,7 +8,7 @@ See [`Menu`](menu.md) for examples.
 
 Create a new `MenuItem` with the following method:
 
-### new MenuItem(options)
+### `new MenuItem(options)`
 
 * `options` Object
   * `click` Function - Will be called with

+ 1 - 1
docs/api/power-save-blocker.md

@@ -23,7 +23,7 @@ The `powerSaveBlocker` module has the following methods:
   * `prevent-app-suspension` - Prevent the application from being suspended.
     Keeps system active but allows screen to be turned off.  Example use cases:
     downloading a file or playing audio.
-  * `prevent-display-sleep`- Prevent the display from going to sleep. Keeps
+  * `prevent-display-sleep` - Prevent the display from going to sleep. Keeps
     system and screen active.  Example use case: playing video.
 
 Starts preventing the system from entering lower-power mode. Returns an integer

+ 2 - 2
docs/api/session.md

@@ -21,7 +21,7 @@ console.log(ses.getUserAgent())
 
 The `session` module has the following methods:
 
-### session.fromPartition(partition[, options])
+### `session.fromPartition(partition[, options])`
 
 * `partition` String
 * `options` Object
@@ -44,7 +44,7 @@ of an existing `Session` object.
 
 The `session` module has the following properties:
 
-### session.defaultSession
+### `session.defaultSession`
 
 Returns the default session object of the app.
 

+ 1 - 3
docs/api/system-preferences.md

@@ -63,9 +63,7 @@ Removes the subscriber with `id`.
 ### `systemPreferences.subscribeLocalNotification(event, callback)` _macOS_
 
 Same as `subscribeNotification`, but uses `NSNotificationCenter` for local defaults.
-This is necessary for events such as:
-
-* `NSUserDefaultsDidChangeNotification`
+This is necessary for events such as `NSUserDefaultsDidChangeNotification`
 
 ### `systemPreferences.unsubscribeLocalNotification(id)` _macOS_
 

+ 2 - 3
docs/api/web-contents.md

@@ -933,7 +933,6 @@ Opens the developer tools for the service worker context.
 #### `contents.send(channel[, arg1][, arg2][, ...])`
 
 * `channel` String
-* `arg` (optional)
 
 Send an asynchronous message to renderer process via `channel`, you can also
 send arbitrary arguments. Arguments will be serialized in JSON internally and
@@ -977,8 +976,8 @@ app.on('ready', () => {
 
 * `screenPosition` String - Specify the screen type to emulate
     (default: `desktop`)
-  * `desktop`
-  * `mobile`
+  * `desktop` - Desktop screen type
+  * `mobile` - Mobile screen type
 * `screenSize` Object - Set the emulated screen size (screenPosition == mobile)
   * `width` Integer - Set the emulated screen width
   * `height` Integer - Set the emulated screen height