package main import ( "github.com/webview/webview" ) var w webview.WebView func acerta() { w.Eval("document.getElementById('txt01').value = '*****'") } func main() { debug := true page := `data:text/html, ` w = webview.New(debug) defer w.Destroy() w.SetTitle("Minimal webview example") w.SetSize(800, 600, webview.HintNone) w.Bind("go_click", func(x string) string { acerta() return "Digitou: " + x }) w.Init("window.alert('teste')") w.Navigate(page) w.Run() }