feat: enhance native window.open to match the custom implementation's behavior (#19703)
Co-authored-by: Andy Locascio <andy@slack-corp.com>
This commit is contained in:
parent
b1f4ac00f0
commit
74372d65ae
20 changed files with 350 additions and 143 deletions
23
docs/api/structures/post-body.md
Normal file
23
docs/api/structures/post-body.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# PostBody Object
|
||||
|
||||
* `data` Array<[PostData](./post-data.md)> - The post data to be sent to the
|
||||
new window.
|
||||
* `contentType` String - The `content-type` header used for the data. One of
|
||||
`application/x-www-form-urlencoded` or `multipart/form-data`. Corresponds to
|
||||
the `enctype` attribute of the submitted HTML form.
|
||||
* `boundary` String (optional) - The boundary used to separate multiple parts of
|
||||
the message. Only valid when `contentType` is `multipart/form-data`.
|
||||
|
||||
Note that keys starting with `--` are not currently supported. For example, this will errantly submit as `multipart/form-data` when `nativeWindowOpen` is set to `false` in webPreferences:
|
||||
|
||||
```html
|
||||
<form
|
||||
target="_blank"
|
||||
method="POST"
|
||||
enctype="application/x-www-form-urlencoded"
|
||||
action="https://postman-echo.com/post"
|
||||
>
|
||||
<input type="text" name="--theKey">
|
||||
<input type="submit">
|
||||
</form>
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue