Re: [w3c/webcomponents] Need callback for form submit data (#187)

Issues with `beforesubmit` (or `formdata` as @tkent-google named it):
* `FormData` is only for `multipart/form-data`, it's not intended for `application/x-www-form-urlencoded` (that's `URLSearchParams`). Not sure we should mix these. The problem with the latter is that it doesn't non-UTF-8 (we could not enable this feature in forms that do not use UTF-8 I suppose). And then there's `text/plain` too. Not sure how to deal with that... An alternative here might be that we only support `multipart/form-data` for now.
* Currently in the specification we gather the "form data set" after firing `invalid` and `submit` events. We'll have to move these around, but that should not be observable. I'm guessing we want to fire this after `invalid`, but before `submit`? And we want to make this cancelable too?

(As for the issues raised in the linked document, I think it should be the same object, be mutable, and contain existing entries.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/187#issuecomment-371021550

Received on Wednesday, 7 March 2018 04:47:14 UTC