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

Blob constructor vs. BlobBuilder #16

Closed
claydiffrient opened this issue Aug 28, 2012 · 5 comments
Closed

Blob constructor vs. BlobBuilder #16

claydiffrient opened this issue Aug 28, 2012 · 5 comments

Comments

@claydiffrient
Copy link

BlobBuilder and Blob.webkitSlice() have both been deprecated in Chrome. The code should be updated to use the Blob constructor and Blob.slice() instead.

@gildas-lormeau
Copy link
Owner

Actually zip.js does use the Blob contructor when BlobBuilder is not available. Blob#slice is already used too. Anyway, I guess zip.js should look first for the presence of Blob constructor and then BlobBuilder constructor. The problem is that I don't know how to write Blob constructor feature test without a try/catch which I'd prefer not to use.

@claydiffrient
Copy link
Author

Okay. I just saw warnings in the console being thrown concerning it and no bug already open. As far as doing the test for it could you simply check what window.Blob returns? If it returns a function then you are good to use it if it returns something else switch to using the BlobBuilder.

@gildas-lormeau
Copy link
Owner

I also noticed these warnings. I hope they will disappear soon ;). The test you suggested does not work on Safari 6. See this issue for more info: #15

@claydiffrient
Copy link
Author

I was really hoping that test would work. C'est la vie, alors!

@gildas-lormeau
Copy link
Owner

Yes, the Blob type on Safari 6 has a certain je ne sais quoi that I find very annoying.

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

No branches or pull requests

2 participants