Closed jony89 closed 7 years ago
I don't extend FormData if such exist I have created a own class that XHR is unaware of what it's
polyfill is not an instance of window.FormData therefor it won't work The reason being that once i add stuff into the native partially supported FormData, I got no way to read, delete or edit the FormData... So i had to keep track of it myself
And i don't want to monkey patch XHR, or Fetch to support it out of the box
if you want it to work out of the box then do something like this:
XMLHttpRequest = class extends XMLHttpRequest {
send(data) {
super.send(data instanceof polyfill ? data._blob() : data)
}
}
before i used the plugin I've supplied directly the formData object created by new FormData() to $.ajax .
now i had to use _asNative() method:
I expect it to work the same.