Closed kityun closed 2 years ago
go func(){
...
callback(func(){ w.Eval(" alert('Hello from webview!'); ") ) ..
}
At least for now, Eval only works on the main thread. Using Dispatch should help. You'll have to do:
Eval
Dispatch
w.Dispatch(func() { w.Eval(" alert('Hello from webview!'); ") })
go func(){
...
callback(func(){ w.Eval(" alert('Hello from webview!'); ") ) ..
}