whatwg / xhr

XMLHttpRequest Standard
https://xhr.spec.whatwg.org/
Other
314 stars 131 forks source link

Make FormData a cloneable object #55

Open annevk opened 8 years ago

annevk commented 8 years ago

This can be done after https://github.com/whatwg/html/pull/727 lands.

wisniewskit commented 7 years ago

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

annevk commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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

inexorabletash commented 6 years ago

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

jed-meyer commented 5 years ago

Apparently Firefox already supports this.

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

annevk commented 5 years ago

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 commented 5 months ago

Is this now supported?