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

Nexus 7 Dolphin 11 "Object #<Response> has no method 'blob'" #355

Closed
tobireif opened this issue Jun 24, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@tobireif
Copy link

commented Jun 24, 2016

On Nexus 7 in Dolphin 11 I'm getting "Object # has no method 'blob'".

@tobireif

This comment has been minimized.

Copy link
Author

commented Jun 24, 2016

Also in Android Browser 4.1.

@dgraham

This comment has been minimized.

Copy link
Member

commented Jun 28, 2016

The Response.blob function is available only when Blob is supported by the browser. The Blob constructor was first available on Android with Chrome 50.

@dgraham dgraham closed this Jun 28, 2016

@tobireif

This comment has been minimized.

Copy link
Author

commented Jun 29, 2016

Thanks!

For future visitors, here's the feature-detection code you linked:

'FileReader' in self && 'Blob' in self && (function() {
  try {
    new Blob()
    return true
  } catch(e) {
    return false
  }
})()
@jimmywarting

This comment has been minimized.

Copy link

commented Oct 16, 2016

I think it's insufficient to only include the blob method when it's possible to use it. Leaving the user with question to why it doesn't exist.

res.blob() returns a promise and I think we could use it and reject if it fails to construct a blob. With a message like

reject(new Error("Failed to construct a blob, Include a Blob polyfill, https://github.com/eligrey/Blob.js"))

Leaving us with fewer browser specific hacks

@mislav

This comment has been minimized.

Copy link
Member

commented Oct 16, 2016

@jimmywarting That's an excellent idea. We'd love a PR that does that.

jimmywarting added a commit to jimmywarting/fetch that referenced this issue Oct 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.