- From: Jon Jensen <notifications@github.com>
- Date: Wed, 25 Jan 2023 14:38:59 -0800
- To: whatwg/xhr <xhr@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 25 January 2023 22:39:11 UTC
@jenseng commented on this pull request.
> @@ -1609,7 +1609,7 @@ typedef (File or USVString) FormDataEntryValue;
[Exposed=(Window,Worker)]
interface FormData {
- constructor(optional HTMLFormElement form);
+ constructor(optional HTMLFormElement form, optional HTMLElement? submitter = null);
Ah here's a good justification for `requestSubmit` accepting null: https://github.com/whatwg/html/issues/3195#issuecomment-547475867
Similarly this could be useful for the `FormData` constructor, e.g. `SubmitEvent.submitter` could be null, and it would be nice to avoid null checks:
```javascript
myForm.addEventListener("submit", () => {
const formData = new FormData(e.target, e.submitter);
// ...
});
```
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/pull/366#discussion_r1087256875
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/xhr/pull/366/review/1270232497@github.com>
Received on Wednesday, 25 January 2023 22:39:11 UTC