Merge pull request #7540 from deepak1556/form_post_new_window_patch
webContents: handle POST navigation for new windows
This commit is contained in:
commit
4867475cee
18 changed files with 321 additions and 65 deletions
|
@ -969,6 +969,7 @@ Same as `webContents.capturePage([rect, ]callback)`.
|
|||
* `httpReferrer` String (optional) - A HTTP Referrer url.
|
||||
* `userAgent` String (optional) - A user agent originating the request.
|
||||
* `extraHeaders` String (optional) - Extra headers separated by "\n"
|
||||
* `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] (optional)
|
||||
|
||||
Same as `webContents.loadURL(url[, options])`.
|
||||
|
||||
|
|
4
docs/api/structures/upload-blob.md
Normal file
4
docs/api/structures/upload-blob.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Upload Blob Object
|
||||
|
||||
* `type` String - `blob`.
|
||||
* `blobUUID` String - UUID of blob data to upload.
|
9
docs/api/structures/upload-file-system.md
Normal file
9
docs/api/structures/upload-file-system.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Upload FileSystem Object
|
||||
|
||||
* `type` String - `fileSystem`.
|
||||
* `filsSystemURL` String - FileSystem url to read data for upload.
|
||||
* `offset` Integer - Defaults to `0`.
|
||||
* `length` Integer - Number of bytes to read from `offset`.
|
||||
Defaults to `0`.
|
||||
* `modificationTime` Double - Last Modification time in
|
||||
number of seconds sine the UNIX epoch.
|
9
docs/api/structures/upload-file.md
Normal file
9
docs/api/structures/upload-file.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Upload File Object
|
||||
|
||||
* `type` String - `file`.
|
||||
* `filePath` String - Path of file to be uploaded.
|
||||
* `offset` Integer - Defaults to `0`.
|
||||
* `length` Integer - Number of bytes to read from `offset`.
|
||||
Defaults to `0`.
|
||||
* `modificationTime` Double - Last Modification time in
|
||||
number of seconds sine the UNIX epoch.
|
4
docs/api/structures/upload-raw-data.md
Normal file
4
docs/api/structures/upload-raw-data.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Upload RawData Object
|
||||
|
||||
* `type` String - `rawData`.
|
||||
* `bytes` Buffer - Data to be uploaded.
|
|
@ -487,9 +487,10 @@ win.loadURL('http://github.com')
|
|||
|
||||
* `url` URL
|
||||
* `options` Object (optional)
|
||||
* `httpReferrer` String - A HTTP Referrer url.
|
||||
* `userAgent` String - A user agent originating the request.
|
||||
* `extraHeaders` String - Extra headers separated by "\n"
|
||||
* `httpReferrer` String (optional) - A HTTP Referrer url.
|
||||
* `userAgent` String (optional) - A user agent originating the request.
|
||||
* `extraHeaders` String (optional) - Extra headers separated by "\n"
|
||||
* `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] (optional)
|
||||
|
||||
Loads the `url` in the window. The `url` must contain the protocol prefix,
|
||||
e.g. the `http://` or `file://`. If the load should bypass http cache then
|
||||
|
|
|
@ -262,9 +262,10 @@ webview.addEventListener('dom-ready', () => {
|
|||
|
||||
* `url` URL
|
||||
* `options` Object (optional)
|
||||
* `httpReferrer` String - A HTTP Referrer url.
|
||||
* `userAgent` String - A user agent originating the request.
|
||||
* `extraHeaders` String - Extra headers separated by "\n"
|
||||
* `httpReferrer` String (optional) - A HTTP Referrer url.
|
||||
* `userAgent` String (optional) - A user agent originating the request.
|
||||
* `extraHeaders` String (optional) - Extra headers separated by "\n"
|
||||
* `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] (optional)
|
||||
|
||||
Loads the `url` in the webview, the `url` must contain the protocol prefix,
|
||||
e.g. the `http://` or `file://`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue