Closed minj closed 11 years ago
I work around it by prepending this to the declaration:
var BlobBuilder = (typeof (Blob) == 'function') && (function() {
"use strict";
var FakeBlobBuilder = function() {
this.data = [];
};
var FBB_proto = FakeBlobBuilder.prototype;
FBB_proto.append = function(data) {
this.data.push(data);
};
FBB_proto.getBlob = function(type) {
if (!arguments.length) {
type = null;
}
return new Blob(this.data, { type: type });
};
FBB_proto.toString = function() {
return "[object BlobBuilder]";
};
return FakeBlobBuilder;
})()
Although, in all likeliness the whole polyfill should be rewritten according to Blob() api
I will get on updating BlobBuilder.js for the new API next week (or you can submit a pull request if you'd like to help). I'm very busy with finals this week.
Is there any updates in this problem?
It will be fixed this weekend for sure.
Fixed
You are redefining window.URL.createObjectURL which causes it to fail when given a Blob object in browsers that support it