зеркало из https://github.com/electron/electron.git
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:
Родитель
64078324bf
Коммит
6d55498cc7
|
@ -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.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче