jimmywarting / FormData

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

SyntaxError in IE11 #22

Closed julkue closed 7 years ago

julkue commented 7 years ago

Using the polyfill failed for me in IE11:

2017-08-09 18_34_34-de sede frontend component library - internet explorer

jimmywarting commented 7 years ago

Only have Mac, so it's a bit hard for me to test

julkue commented 7 years ago

Just use BrowserSync or Saucelabs.

anddoutoi commented 7 years ago

@julmot or even better… "just" debug, fix and make a PR.

julkue commented 7 years ago

Why don't you do this yourself? And who are you?

cheeaun commented 7 years ago

@julmot is it possible to create a simple demo page to reproduce this bug? It's difficult to pinpoint the problem when the error is cryptic and there's no steps to reproduce this error.

r3dcrosse commented 7 years ago

@jimmywarting If you want to test IE/Edge on a Mac, I recommend using some kind of Virtual Machine software and the free virtual machines from Microsoft.

@julmot I'm having difficulty reproducing your error in IE11. Is it possible that error is coming from something else in your scripts.js bundle? If it is coming from the FormData polyfill, what were the steps you took that caused that error?

julkue commented 7 years ago

Unfortunately I can't. I've tried to create a sample but experiencing another bug: The plugin seems to relay on module, which isn't available in JSFiddles...

2017-08-27 19_50_35-create a new fiddle - jsfiddle

However, with this HTML as a starting point you should be able to reproduce the other bug:

https://jsfiddle.net/qzbuhr5h/

I won't spend more time in this. I guess for the future it would make sense to cross-browser test this plugin before releasing a version, in the best case automatically (e.g. with BrowserStack or SauceLabs). You could also specify supported browsers with their version in the documentation.

jimmywarting commented 7 years ago

it's the way you load the plugin which is failing, I have only made it available with a modular loader. you can't directly include the file in a browser.

If you would use something like browserifies wzrd.in cdn and load the file like this

<script src="https://wzrd.in/standalone/formdata-polyfill@latest"></script>

then you would have it available as window.formdataPolyfill

working demo: https://jsfiddle.net/qzbuhr5h/1/