package main
import webview "github.com/webview/webview_go"
const html = `
You tapped 0 time(s).
`
type IncrementResult struct {
Count uint `json:"count"`
}
func main() {
var count uint = 0
w := webview.New(false)
defer w.Destroy()
w.SetTitle("Bind Example")
w.SetSize(480, 320, webview.HintNone)
// A binding that increments a value and immediately returns the new value.
w.Bind("increment", func() IncrementResult {
count++
return IncrementResult{Count: count}
})
w.SetHtml(html)
w.Run()
}