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