Superagent: .field() breaks in IE9

Created on 23 Dec 2015  路  11Comments  路  Source: visionmedia/superagent

This is a duplicate of #775, but since it has been closed without further discussion I'm opening a new issue.

When using the .field() method in IE9 (bundled with Webpack), an Object doesn't support this action error is thrown. This seems related to the FormData interface, which is not supported by IE9, even though SuperAgent uses a third-party implementation.

Form-Data v1.0.0-rc2 added a shim for browser, but it still just returns the native FormData, which IE9 does not have. Is a polyfill required?

Browser Bug

Most helpful comment

As fas as I know there are no (reliable) polyfills for FormData. If someone can recommend one that works in IE9, please tell!

All 11 comments

+1

@rbardini Thanks for the detailed analysis. I suspect you are right and a polyfill is necessary. PR would be welcome, especially with tests as without automated tests IE9 support could easily rot over time.

+1

As fas as I know there are no (reliable) polyfills for FormData. If someone can recommend one that works in IE9, please tell!

Is this fixed or still open?

I'm going to close it as wontfix:

We require FormData polyfill for IE9, as noted in the README. This requirement won't change.

If you still need reliable IE9 support and FormData polyfills aren't good enough, then use JSON or real HTML forms instead.

Here is a reliable FormData polyfill: https://github.com/jimmywarting/FormData

@jimmywarting i use your polyfill in my code, and run it in IE9, but the console show error like:
SCRIPT5009: 'Blob' undefined
and i found Blob support IE10 from https://developer.mozilla.org/en-US/docs/Web/API/Blob
how to solve it? thx~

Blobs are used to upload files via JS, which IE9 does not support. If you get errors about Blob being undefined, it means your polyfill is not compatible with IE9.

okays... thanks for your apply~ i will try to use other polyfill.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tj picture tj  路  4Comments

kornelski picture kornelski  路  9Comments

kornelski picture kornelski  路  4Comments

srohde picture srohde  路  8Comments

t3hmrman picture t3hmrman  路  9Comments