Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FormData a cloneable object #55

Open
annevk opened this issue Feb 28, 2016 · 8 comments
Open

Make FormData a cloneable object #55

annevk opened this issue Feb 28, 2016 · 8 comments
Labels
addition/proposal New features or enhancements needs tests Moving the issue forward requires someone to write tests topic: formdata

Comments

@annevk
Copy link
Member

annevk commented Feb 28, 2016

This can be done after whatwg/html#727 lands.

@wisniewskit
Copy link

Was this something that should be dealt with now that the referenced landing happened?

@annevk
Copy link
Member Author

annevk commented Dec 11, 2016

Yeah maybe, although I haven't seen much interest. Do you happen to know if in the implementation we effectively clone FormData objects when they are passed to XMLHttpRequest?

@inexorabletash
Copy link
Member

FWIW, in Blink's XHR implementation we synchronously serialize the passed FormData; nothing shared with the cloning implementation, no script-visible side effects, etc.

@annevk
Copy link
Member Author

annevk commented Jan 23, 2018

Apparently Firefox already supports this. Is there interest from Chrome in supporting this @inexorabletash? @youennf WebKit? @travisleithead Edge?

@inexorabletash
Copy link
Member

SGTM; not high on the priority list but seems doable. Tests would be great.

@annevk annevk added the addition/proposal New features or enhancements label Apr 18, 2018
@annevk annevk added the needs tests Moving the issue forward requires someone to write tests label Mar 24, 2019
@jed-meyer
Copy link

Apparently Firefox already supports this.

This doesn't hold true (anymore), see dexie/Dexie.js#861

@annevk
Copy link
Member Author

annevk commented Jul 3, 2019

Well,

onmessage = e => console.log(e.data)
postMessage(new FormData(),"*");

does log a FormData object in Firefox Nightly and an exception in Chrome Canary. However, the serialization steps for a given platform object are also passed a forStorage boolean. I suspect Firefox throws if that is true, based on your analysis.

@pavinduLakshan
Copy link

Is this now supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs tests Moving the issue forward requires someone to write tests topic: formdata
Development

No branches or pull requests

5 participants