Skip to content

Commit

Permalink
docs: Fix types and missing property in WebRequest APIs (backport: 5-…
Browse files Browse the repository at this point in the history
…0-x) (#17167)

* docs: Fixed hook methods of WebRequest accepts null as listener

* docs: Added missing `referrer` property in OnBeforeRequestDetails

* docs: Add `referrer` to each webRequest responses
  • Loading branch information
trop[bot] authored and MarshallOfSound committed Feb 28, 2019
1 parent 7e3ff0f commit 00cfedb
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions docs/api/web-request.md
Expand Up @@ -45,13 +45,14 @@ The following methods are available on instances of `WebRequest`:
* `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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `uploadData` [UploadData[]](structures/upload-data.md)
* `callback` Function
Expand All @@ -72,13 +73,14 @@ The `callback` has to be called with an `response` 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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `requestHeaders` Object
* `callback` Function
Expand All @@ -98,13 +100,14 @@ The `callback` has to be called with an `response` 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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `requestHeaders` Object

Expand All @@ -117,13 +120,14 @@ response are visible by the time this listener is fired.
* `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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `statusLine` String
* `statusCode` Integer
Expand All @@ -147,13 +151,14 @@ The `callback` has to be called with an `response` 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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `responseHeaders` Object
* `fromCache` Boolean - Indicates whether the response was fetched from disk
Expand All @@ -170,13 +175,14 @@ and response headers are available.
* `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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `redirectURL` String
* `statusCode` Integer
Expand All @@ -193,7 +199,7 @@ redirect is about to occur.
* `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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
Expand All @@ -215,13 +221,14 @@ completed.
* `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
* `listener` Function | null
* `details` Object
* `id` Integer
* `url` String
* `method` String
* `webContentsId` Integer (optional)
* `resourceType` String
* `referrer` String
* `timestamp` Double
* `fromCache` Boolean
* `error` String - The error description.
Expand Down

0 comments on commit 00cfedb

Please sign in to comment.