Skip to content

Commit c72500e

Browse files
committed
Fixed #20
1 parent a500f28 commit c72500e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dom-pixels.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ function handleGif(data, cb) {
6464

6565
function httpGif(url, cb) {
6666
var xhr = new XMLHttpRequest()
67+
xhr.open('GET', url, true)
6768
xhr.responseType = 'arraybuffer'
68-
xhr.overrideMimeType('application/binary')
69+
if(xhr.overrideMimeType){
70+
xhr.overrideMimeType('application/binary')
71+
}
6972
xhr.onerror = function(err) {
7073
cb(err)
7174
}
@@ -77,7 +80,6 @@ function httpGif(url, cb) {
7780
handleGif(data, cb)
7881
return
7982
}
80-
xhr.open('GET', url, true)
8183
xhr.send()
8284
}
8385

0 commit comments

Comments
 (0)