Use ArrayBufferView to construct blobs.

This commit is contained in:
Nicolas Stepien 2012-08-13 17:07:06 +02:00
parent 5522be6c15
commit 8b0ca6ff07
2 changed files with 2 additions and 2 deletions

View File

@ -2052,7 +2052,7 @@
for (i = _i = 0; 0 <= l ? _i < l : _i > l; i = 0 <= l ? ++_i : --_i) {
ui8a[i] = data.charCodeAt(i);
}
_this.url = url.createObjectURL(new Blob([ui8a.buffer], {
_this.url = url.createObjectURL(new Blob([ui8a], {
type: 'image/png'
}));
_this.el.style.backgroundImage = "url(" + _this.url + ")";

View File

@ -1601,7 +1601,7 @@ QR =
for i in [0...l]
ui8a[i] = data.charCodeAt i
@url = url.createObjectURL new Blob [ui8a.buffer], type: 'image/png'
@url = url.createObjectURL new Blob [ui8a], type: 'image/png'
@el.style.backgroundImage = "url(#{@url})"
url.revokeObjectURL? fileUrl