jimmywarting / FormData

HTML5 `FormData` polyfill for Browsers and nodejs
MIT License
360 stars 102 forks source link

Is this program support IE11? #132

Closed Seven-Oo closed 3 years ago

Seven-Oo commented 3 years ago

In IE10 or IE11, is this program support formData's forEach or values or keys and so on

jimmywarting commented 3 years ago

yup, ie10 and ie11 is supported by the default/main export https://github.com/jimmywarting/FormData/blob/978ee337826c82b3fad777810f3366a3d813cdd9/package.json#L6 it also patches fetch, xhr, and some other stuff

If you need to support IE <= 9 then I recommend you to include eligrey's blob.js (which i hope you don't - since IE is now dead)

the esm build/version don't work well in browser it's mostly for newer node version that lacks DOM and other stuff

Seven-Oo commented 3 years ago

Ok, thank you.

jimmywarting commented 3 years ago

fyi, the main file can be imported using a script tag, require or import. it don't have some special cjs or esm export syntax as it patches the global variable