зеркало из 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
|
||||
* `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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче