Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark FormData support as optional #54

Merged
merged 3 commits into from
Jan 5, 2015
Merged

Conversation

josh
Copy link
Contributor

@josh josh commented Jan 5, 2015

Hypothetically, if a browser doesn't not implement FormData but did implement fetch(), how should Response.prototype.formData behave? Should Response.prototype.formData be undefined or should calling Response.prototype.formData throw some sort of error?

Chrome Canary currently does not implement Response.prototype.formData for an example. Also, old polyfilled IEs won't have FormData.

/cc @dgraham @mislav @annevk

@dgraham
Copy link
Contributor

dgraham commented Jan 5, 2015

I wrote the FormData support for completeness with the spec. We actually have no use cases for it on github.com.

I guess I don't understand the hypothetical situation described. All browsers with fetch also have FormData. Is this a question specifically for IE 9?

@josh
Copy link
Contributor Author

josh commented Jan 5, 2015

The same applies to blob. PhantomJS doesn't implement Blob() so it skips defining Response.prototype.blob.

@dgraham
Copy link
Contributor

dgraham commented Jan 5, 2015

Ah, PhantomJS is the new IE 9.

@josh
Copy link
Contributor Author

josh commented Jan 5, 2015

After this PR, all supported tests pass in Chrome Canary.

josh added a commit that referenced this pull request Jan 5, 2015
@josh josh merged commit 9b1ddc9 into master Jan 5, 2015
@josh josh deleted the optional-form-data-support branch January 5, 2015 23:34
@annevk
Copy link

annevk commented Jan 6, 2015

If there's no support I would expect the property to not be there so you can feature test it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants