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

> 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.

My hope was that FormData would correspond well enough with the spec's concept of "form data set" that it would serve as an appropriate representation for exposing to JavaScript---even if ultimately the data gets transmitted via a non-multipart/form-data format. In particular, it seems like it's a high-fidelity representation of all the stuff you could put in a form.

Is that incorrect? Are there concrete mismatches where `spec's form data set -> FormData -> application/x-www-form-urlencoded` would lose data, compared to `spec's form data set -> application/x-www-form-urlencoded`?

-- 
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-371395668

Received on Thursday, 8 March 2018 06:45:14 UTC