docs: Fix types and missing property in WebRequest APIs (#17046)

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

* docs: Added missing `referrer` property in OnBeforeRequestDetails

* docs: Add `referrer` to each webRequest responses
This commit is contained in:
Linda_pp 2019-02-28 18:30:38 +09:00 коммит произвёл Shelley Vohr
Родитель 64078324bf
Коммит 6d55498cc7
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -52,6 +52,7 @@ The following methods are available on instances of `WebRequest`:
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `uploadData` [UploadData[]](structures/upload-data.md) * `uploadData` [UploadData[]](structures/upload-data.md)
* `callback` Function * `callback` Function
@ -79,6 +80,7 @@ The `callback` has to be called with an `response` object.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `requestHeaders` Object * `requestHeaders` Object
* `callback` Function * `callback` Function
@ -105,6 +107,7 @@ The `callback` has to be called with an `response` object.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `requestHeaders` Object * `requestHeaders` Object
@ -124,6 +127,7 @@ response are visible by the time this listener is fired.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `statusLine` String * `statusLine` String
* `statusCode` Integer * `statusCode` Integer
@ -154,6 +158,7 @@ The `callback` has to be called with an `response` object.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `responseHeaders` Object * `responseHeaders` Object
* `fromCache` Boolean - Indicates whether the response was fetched from disk * `fromCache` Boolean - Indicates whether the response was fetched from disk
@ -177,6 +182,7 @@ and response headers are available.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `redirectURL` String * `redirectURL` String
* `statusCode` Integer * `statusCode` Integer
@ -222,6 +228,7 @@ completed.
* `method` String * `method` String
* `webContentsId` Integer (optional) * `webContentsId` Integer (optional)
* `resourceType` String * `resourceType` String
* `referrer` String
* `timestamp` Double * `timestamp` Double
* `fromCache` Boolean * `fromCache` Boolean
* `error` String - The error description. * `error` String - The error description.