mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
Bug fix: responseType must be set after opening
This commit is contained in:
parent
2eea1afcd1
commit
ab2b884c49
@ -30,8 +30,8 @@ func NewImageFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.I
|
||||
var content js.Object
|
||||
ch := make(chan struct{})
|
||||
req := js.Global.Get("XMLHttpRequest").New()
|
||||
req.Set("responseType", "arraybuffer")
|
||||
req.Call("open", "GET", path, true)
|
||||
req.Set("responseType", "arraybuffer")
|
||||
req.Set("onload", func() {
|
||||
defer close(ch)
|
||||
status := req.Get("status").Int()
|
||||
|
Loading…
Reference in New Issue
Block a user