Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix checking for FormData existence#148

Open
yeonhoyoon wants to merge 1 commit intoded:master from
yeonhoyoon:patch-2
Open

fix checking for FormData existence #148
yeonhoyoon wants to merge 1 commit intoded:master from
yeonhoyoon:patch-2

Conversation

@yeonhoyoon
Copy link
Contributor

@yeonhoyoon yeonhoyoon commented Jul 16, 2014

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

in Safari, typeof FormData returns "object" instead of "function"
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?

Copy link
Contributor

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

Copy link
Contributor Author

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

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /