Skip to content

Conversation

@yeonhoyoon
Copy link
Contributor

in Safari, typeof FormData returns "object" instead of "function"

in Safari, typeof FormData returns "object" instead of "function"
@ded
Copy link
Owner

ded commented Jul 16, 2014

In that case, is there a more legit way of checking like seeing if it has any unique properties?

@keronsen
Copy link
Contributor

Isn't o['data'] instanceof FormData enough on its own? Why is the typeof check neccesary?

@yeonhoyoon
Copy link
Contributor Author

@keronsen In older browsers, FormData is not defined, so o['data'] instanceof FormData will throw ReferenceError.

@thomsbg
Copy link

thomsbg commented Aug 31, 2015

Any updates on this? According to @yeonhoyoon's last comment, perhaps the check should be:

typeof FormData !== 'undefined', or 'FormData' in window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants