added arrayBuffer and text methods to blob

This commit is contained in:
Jimmy Wärting
2019-04-19 17:26:07 +02:00
parent 5735017461
commit eb14683b06
+7
View File
@@ -366,7 +366,14 @@
} else {
this.type = this.type.toLowerCase()
}
}
Blob.prototype.arrayBuffer = function () {
return Promise.resolve(this._buffer)
}
Blob.prototype.text = function () {
return Promise.resolve(textDecode(this._buffer))
}
Blob.prototype.slice = function (start, end, type) {