Merge pull request #10454 from electron/MarshallOfSound-patch-1

Mark filters as optional inside webRequest
This commit is contained in:
Zeke Sikelianos 2017-09-07 21:45:24 -07:00 committed by GitHub
commit fbfd781426
2 changed files with 9 additions and 9 deletions

View file

@ -46,7 +46,7 @@ The `crashReporter` module has the following methods:
* `extra` Object (optional) - An object you can define that will be sent along with the
report. Only string properties are sent correctly. Nested objects are not
supported and the property names and values must be less than 64 characters long.
* `crashesDirectory` String - Directory to store the crashreports temporarily (only used when the crash reporter is started via `process.crashReporter.start`)
* `crashesDirectory` String (optional) - Directory to store the crashreports temporarily (only used when the crash reporter is started via `process.crashReporter.start`)
You are required to call this method before using any other `crashReporter` APIs
and in each process (main/renderer) from which you want to collect crash reports.

View file

@ -41,7 +41,7 @@ The following methods are available on instances of `WebRequest`:
#### `webRequest.onBeforeRequest([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -67,7 +67,7 @@ The `callback` has to be called with an `response` object.
#### `webRequest.onBeforeSendHeaders([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -93,7 +93,7 @@ The `callback` has to be called with an `response` object.
#### `webRequest.onSendHeaders([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -111,7 +111,7 @@ response are visible by the time this listener is fired.
#### `webRequest.onHeadersReceived([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -141,7 +141,7 @@ The `callback` has to be called with an `response` object.
#### `webRequest.onResponseStarted([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -163,7 +163,7 @@ and response headers are available.
#### `webRequest.onBeforeRedirect([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -185,7 +185,7 @@ redirect is about to occur.
#### `webRequest.onCompleted([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function
@ -205,7 +205,7 @@ completed.
#### `webRequest.onErrorOccurred([filter, ]listener)`
* `filter` Object
* `filter` Object - (optional)
* `urls` String[] - Array of URL patterns that will be used to filter out the
requests that do not match the URL patterns.
* `listener` Function