Browse Source

Merge pull request #9154 from miniak/fix-api-docs

Fix api docs
Kevin Sawicki 8 years ago
parent
commit
3ec7900e6e
2 changed files with 17 additions and 1 deletions
  1. 1 1
      docs/api/session.md
  2. 16 0
      docs/api/web-request.md

+ 1 - 1
docs/api/session.md

@@ -287,7 +287,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
 #### `ses.setPermissionRequestHandler(handler)`
 
 * `handler` Function
-  * `webContents` Object - [WebContents](web-contents.md) requesting the permission.
+  * `webContents` [WebContents](web-contents.md) - WebContents requesting the permission.
   * `permission` String - Enum of 'media', 'geolocation', 'notifications', 'midiSysex',
     'pointerLock', 'fullscreen', 'openExternal'.
   * `callback` Function

+ 16 - 0
docs/api/web-request.md

@@ -42,6 +42,8 @@ The following methods are available on instances of `WebRequest`:
 #### `webRequest.onBeforeRequest([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` Integer
@@ -66,6 +68,8 @@ The `callback` has to be called with an `response` object.
 #### `webRequest.onBeforeSendHeaders([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
 
 The `listener` will be called with `listener(details, callback)` before sending
@@ -90,6 +94,8 @@ The `callback` has to be called with an `response` object.
 #### `webRequest.onSendHeaders([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` Integer
@@ -106,6 +112,8 @@ response are visible by the time this listener is fired.
 #### `webRequest.onHeadersReceived([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
 
 The `listener` will be called with `listener(details, callback)` when HTTP
@@ -134,6 +142,8 @@ The `callback` has to be called with an `response` object.
 #### `webRequest.onResponseStarted([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` Integer
@@ -154,6 +164,8 @@ and response headers are available.
 #### `webRequest.onBeforeRedirect([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` String
@@ -174,6 +186,8 @@ redirect is about to occur.
 #### `webRequest.onCompleted([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` Integer
@@ -192,6 +206,8 @@ completed.
 #### `webRequest.onErrorOccurred([filter, ]listener)`
 
 * `filter` Object
+  * `urls` String[] - Array of URL patterns that will be used to filter out the 
+        requests that do not match the URL patterns.
 * `listener` Function
   * `details` Object
     * `id` Integer