mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
uidriver/js: Clean up
This commit is contained in:
parent
be1a8bddbf
commit
7ccc29e3c7
@ -203,10 +203,11 @@ func (u *UserInterface) loop(context driver.UIContext) <-chan error {
|
|||||||
} else {
|
} else {
|
||||||
setTimeout.Invoke(cf, 0)
|
setTimeout.Invoke(cf, 0)
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Should cf be released after the game ends?
|
// TODO: Should cf be released after the game ends?
|
||||||
cf = js.FuncOf(func(this js.Value, args []js.Value) interface{} {
|
cf = js.FuncOf(func(this js.Value, args []js.Value) interface{} {
|
||||||
|
// f can be blocked but callbacks must not be blocked. Create a goroutine (#1161).
|
||||||
go f()
|
go f()
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user