]> khamidou — GitHub mirrors - electron.git/commitdiff
Add (optional) notation
authorJessica Lord <jlord@github.com>
Mon, 24 Aug 2015 22:55:53 +0000 (15:55 -0700)
committerJessica Lord <jlord@github.com>
Wed, 26 Aug 2015 17:45:57 +0000 (10:45 -0700)
docs/api/browser-window.md
docs/api/session.md
docs/api/web-contents.md

index b7ea92fb13519ef36a6f75b77a81381944e4ba96..8444412424eb2254a9b2e0b944c4a4a42268f588 100644 (file)
@@ -30,8 +30,8 @@ Properties `width` and `height` are required.
 
 `options` Object, properties:
 
-* `width` Integer **required** - Window's width.
-* `height` Integer **required** - Window's height.
+* `width` Integer (**required**) - Window's width.
+* `height` Integer (**required**) - Window's height.
 * `x` Integer - Window's left offset from screen.
 * `y` Integer - Window's top offset from screen.
 * `use-content-size` Boolean - The `width` and `height` would be used as web
@@ -402,12 +402,12 @@ Sets whether the window should be in fullscreen mode.
 
 Returns a boolean, whether the window is in fullscreen mode.
 
-### `win.setAspectRatio(aspectRatio[, extraSize])`
+### `win.setAspectRatio(aspectRatio[, extraSize])` _OS X_
 
 * `aspectRatio` The aspect ratio we want to maintain for some portion of the
 content view.
-* `rect` Object - The extra size to not be included in the aspect ratio to be
-maintained. Properties:
+* `extraSize` Object (optional) - The extra size not to be included while
+maintaining the aspect ratio. Properties:
   * `width` Integer
   * `height` Integer
 
@@ -589,7 +589,7 @@ __Note__: This API is only available on OS X.
 
 ### `win.openDevTools([options])`
 
-* `options` Object, optional. Properties:
+* `options` Object (optional). Properties:
   * `detach` Boolean - opens devtools in a new window
 
 Opens the developer tools.
@@ -624,7 +624,7 @@ contents.
 
 ### `win.capturePage([rect, ]callback)`
 
-* `rect` Object - The area of page to be captured, properties:
+* `rect` Object (optional)- The area of page to be captured, properties:
   * `x` Integer
   * `y` Integer
   * `width` Integer
index b589254087fe9363329f41723735e1a4c3296533..184d175227be2d8afadca7ec51045ba674868b3e 100644 (file)
@@ -116,7 +116,7 @@ Clears the session’s HTTP cache.
 
 ### `session.clearStorageData([options, ]callback)`
 
-* `options` Object
+* `options` Object (optional)
   * `origin` String - Should follow `window.location.origin`’s representation
     `scheme://host:port`
   * `storages` Array - The types of storages to clear, can contain:
index 19193fc32f05e0617dff2f30a21f3ffd27c52e24..fe68d8a6a6f2cb4befea59017538cb9c142ccc58 100644 (file)
@@ -161,7 +161,7 @@ See [session documentation](session.md) for this object's methods.
 ### `webContents.loadUrl(url[, options])`
 
 * `url` URL
-* `options` Object, properties:
+* `options` Object (optional). Properties:
   * `httpReferrer` String - A HTTP Referrer url
   * `userAgent` String - A user agent originating the request
 
@@ -267,7 +267,7 @@ Injects CSS into the current web page.
 ### `webContents.executeJavaScript(code[, userGesture])`
 
 * `code` String
-* `userGesture` Boolean
+* `userGesture` Boolean (optional)
 
 Evaluates `code` in page.
 
@@ -350,7 +350,7 @@ when the JS promise is rejected.
 
 ### `webContents.print([options])`
 
-`options` Object, properties:
+`options` Object (optional). Properties:
 
 * `silent` Boolean - Don't ask user for print settings, defaults to `false`
 * `printBackground` Boolean - Also prints the background color and image of
@@ -438,8 +438,9 @@ Removes the specified path from devtools workspace.
 ### `webContents.send(channel[, args...])`
 
 * `channel` String
+* `args...` (optional)
 
-Send `args..` to the web page via `channel` in an asynchronous message, the web
+Send `args...` to the web page via `channel` in an asynchronous message, the web
 page can handle it by listening to the `channel` event of the `ipc` module.
 
 An example of sending messages from the main process to the renderer process: