mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
Update Blob.js to v2014-05-31.
[ci skip]
This commit is contained in:
parent
1309085d57
commit
91bed93d55
@ -1,11 +1,11 @@
|
|||||||
/* Blob.js
|
/* Blob.js
|
||||||
* A Blob implementation.
|
* A Blob implementation.
|
||||||
* 2013-12-27
|
* 2014-05-31
|
||||||
*
|
*
|
||||||
* By Eli Grey, http://eligrey.com
|
* By Eli Grey, http://eligrey.com
|
||||||
* By Devin Samarin, https://github.com/eboyjr
|
* By Devin Samarin, https://github.com/eboyjr
|
||||||
* License: X11/MIT
|
* License: X11/MIT
|
||||||
* See LICENSE.md
|
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*global self, unescape */
|
/*global self, unescape */
|
||||||
@ -14,12 +14,21 @@
|
|||||||
|
|
||||||
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
||||||
|
|
||||||
if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined")
|
(function (view) {
|
||||||
if ((typeof Blob === "function" || typeof Blob === "object") && typeof webkitURL !== "undefined") self.URL = webkitURL;
|
|
||||||
else var Blob = (function (view) {
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) {
|
view.URL = view.URL || view.webkitURL;
|
||||||
|
|
||||||
|
if (view.Blob && view.URL) {
|
||||||
|
try {
|
||||||
|
new Blob;
|
||||||
|
return;
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Internally we use a BlobBuilder implementation to base Blob off of
|
||||||
|
// in order to support older browsers that only have BlobBuilder
|
||||||
|
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
|
||||||
var
|
var
|
||||||
get_class = function(object) {
|
get_class = function(object) {
|
||||||
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
|
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
|
||||||
@ -150,10 +159,14 @@ else var Blob = (function (view) {
|
|||||||
FB_proto.toString = function() {
|
FB_proto.toString = function() {
|
||||||
return "[object Blob]";
|
return "[object Blob]";
|
||||||
};
|
};
|
||||||
|
FB_proto.close = function() {
|
||||||
|
this.size = 0;
|
||||||
|
delete this.data;
|
||||||
|
};
|
||||||
return FakeBlobBuilder;
|
return FakeBlobBuilder;
|
||||||
}(view));
|
}(view));
|
||||||
|
|
||||||
return function Blob(blobParts, options) {
|
view.Blob = function Blob(blobParts, options) {
|
||||||
var type = options ? (options.type || "") : "";
|
var type = options ? (options.type || "") : "";
|
||||||
var builder = new BlobBuilder();
|
var builder = new BlobBuilder();
|
||||||
if (blobParts) {
|
if (blobParts) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user